Bug 1363061 - Rename toolkit/components/jsdownloads to toolkit/components/downloads. r=mak
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Tue, 06 Mar 2018 17:40:59 +0000
changeset 461938 af5fa4cbcf26422e4bb0693920c13db600b0ae84
parent 461937 13671c01b9873e227d8bf54bc118fa9c8c95793e
child 461939 514feaa0c69872c08f35e1ab4ff77342d3301101
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1363061
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1363061 - Rename toolkit/components/jsdownloads to toolkit/components/downloads. r=mak MozReview-Commit-ID: GuWeax0ubv3
browser/installer/package-manifest.in
build/dumbmake-dependencies
mobile/android/installer/package-manifest.in
testing/runtimes/mochitest-browser-chrome.runtimes.json
toolkit/components/build/moz.build
toolkit/components/downloads/DownloadCore.jsm
toolkit/components/downloads/DownloadHistory.jsm
toolkit/components/downloads/DownloadIntegration.jsm
toolkit/components/downloads/DownloadLegacy.js
toolkit/components/downloads/DownloadList.jsm
toolkit/components/downloads/DownloadPaths.jsm
toolkit/components/downloads/DownloadPlatform.cpp
toolkit/components/downloads/DownloadPlatform.h
toolkit/components/downloads/DownloadStore.jsm
toolkit/components/downloads/DownloadUIHelper.jsm
toolkit/components/downloads/Downloads.jsm
toolkit/components/downloads/Downloads.manifest
toolkit/components/downloads/moz.build
toolkit/components/downloads/mozIDownloadPlatform.idl
toolkit/components/downloads/test/browser/.eslintrc.js
toolkit/components/downloads/test/browser/browser.ini
toolkit/components/downloads/test/browser/browser_DownloadPDFSaver.js
toolkit/components/downloads/test/browser/head.js
toolkit/components/downloads/test/browser/testFile.html
toolkit/components/downloads/test/data/.eslintrc.js
toolkit/components/downloads/test/data/empty.txt
toolkit/components/downloads/test/data/source.txt
toolkit/components/downloads/test/unit/.eslintrc.js
toolkit/components/downloads/test/unit/common_test_Download.js
toolkit/components/downloads/test/unit/head.js
toolkit/components/downloads/test/unit/test_DownloadCore.js
toolkit/components/downloads/test/unit/test_DownloadHistory.js
toolkit/components/downloads/test/unit/test_DownloadIntegration.js
toolkit/components/downloads/test/unit/test_DownloadLegacy.js
toolkit/components/downloads/test/unit/test_DownloadList.js
toolkit/components/downloads/test/unit/test_DownloadPaths.js
toolkit/components/downloads/test/unit/test_DownloadStore.js
toolkit/components/downloads/test/unit/test_Downloads.js
toolkit/components/downloads/test/unit/test_PrivateTemp.js
toolkit/components/downloads/test/unit/xpcshell.ini
toolkit/components/jsdownloads/moz.build
toolkit/components/jsdownloads/public/moz.build
toolkit/components/jsdownloads/public/mozIDownloadPlatform.idl
toolkit/components/jsdownloads/src/DownloadCore.jsm
toolkit/components/jsdownloads/src/DownloadHistory.jsm
toolkit/components/jsdownloads/src/DownloadIntegration.jsm
toolkit/components/jsdownloads/src/DownloadLegacy.js
toolkit/components/jsdownloads/src/DownloadList.jsm
toolkit/components/jsdownloads/src/DownloadPaths.jsm
toolkit/components/jsdownloads/src/DownloadPlatform.cpp
toolkit/components/jsdownloads/src/DownloadPlatform.h
toolkit/components/jsdownloads/src/DownloadStore.jsm
toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
toolkit/components/jsdownloads/src/Downloads.jsm
toolkit/components/jsdownloads/src/Downloads.manifest
toolkit/components/jsdownloads/src/moz.build
toolkit/components/jsdownloads/test/browser/.eslintrc.js
toolkit/components/jsdownloads/test/browser/browser.ini
toolkit/components/jsdownloads/test/browser/browser_DownloadPDFSaver.js
toolkit/components/jsdownloads/test/browser/head.js
toolkit/components/jsdownloads/test/browser/testFile.html
toolkit/components/jsdownloads/test/data/.eslintrc.js
toolkit/components/jsdownloads/test/data/empty.txt
toolkit/components/jsdownloads/test/data/source.txt
toolkit/components/jsdownloads/test/unit/.eslintrc.js
toolkit/components/jsdownloads/test/unit/common_test_Download.js
toolkit/components/jsdownloads/test/unit/head.js
toolkit/components/jsdownloads/test/unit/test_DownloadCore.js
toolkit/components/jsdownloads/test/unit/test_DownloadHistory.js
toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js
toolkit/components/jsdownloads/test/unit/test_DownloadLegacy.js
toolkit/components/jsdownloads/test/unit/test_DownloadList.js
toolkit/components/jsdownloads/test/unit/test_DownloadPaths.js
toolkit/components/jsdownloads/test/unit/test_DownloadStore.js
toolkit/components/jsdownloads/test/unit/test_Downloads.js
toolkit/components/jsdownloads/test/unit/test_PrivateTemp.js
toolkit/components/jsdownloads/test/unit/xpcshell.ini
toolkit/components/moz.build
toolkit/content/contentAreaUtils.js
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -217,31 +217,31 @@
 @RESPATH@/components/dom_sidebar.xpt
 @RESPATH@/components/dom_storage.xpt
 #ifdef MOZ_WEBSPEECH
 @RESPATH@/components/dom_webspeechrecognition.xpt
 #endif
 @RESPATH@/components/dom_workers.xpt
 @RESPATH@/components/dom_xul.xpt
 @RESPATH@/components/dom_presentation.xpt
+@RESPATH@/components/downloads.xpt
 @RESPATH@/components/editor.xpt
 @RESPATH@/components/enterprisepolicies.xpt
 @RESPATH@/components/extensions.xpt
 @RESPATH@/components/exthandler.xpt
 @RESPATH@/components/fastfind.xpt
 @RESPATH@/components/feeds.xpt
 @RESPATH@/components/gfx.xpt
 @RESPATH@/components/html5.xpt
 @RESPATH@/components/htmlparser.xpt
 @RESPATH@/components/imglib2.xpt
 @RESPATH@/components/inspector.xpt
 @RESPATH@/components/intl.xpt
 @RESPATH@/components/jar.xpt
 @RESPATH@/components/jsdebugger.xpt
-@RESPATH@/components/jsdownloads.xpt
 @RESPATH@/browser/components/jsinspector.xpt
 @RESPATH@/components/layout_base.xpt
 #ifdef MOZ_DEBUG
 @RESPATH@/components/layout_debug.xpt
 #endif
 #ifdef NS_PRINTING
 @RESPATH@/components/layout_printing.xpt
 #endif
--- a/build/dumbmake-dependencies
+++ b/build/dumbmake-dependencies
@@ -55,17 +55,17 @@ browser/app
   browser/base
   browser/components
   devtools/client
   browser/locales
   browser/modules
   browser/themes
   toolkit
   toolkit/components
-  toolkit/components/jsdownloads
+  toolkit/components/downloads
   toolkit/content
   toolkit/crashreporter
   toolkit/forgetaboutsite
   toolkit/identity
   toolkit/modules
   toolkit/mozapps/extensions
   toolkit/profile
   toolkit/themes
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -142,30 +142,30 @@
 @BINPATH@/components/dom_storage.xpt
 @BINPATH@/components/dom_system.xpt
 #ifdef MOZ_WEBSPEECH
 @BINPATH@/components/dom_webspeechrecognition.xpt
 #endif
 @BINPATH@/components/dom_xhr.xpt
 @BINPATH@/components/dom_xul.xpt
 @BINPATH@/components/dom_presentation.xpt
+@BINPATH@/components/downloads.xpt
 @BINPATH@/components/editor.xpt
 @BINPATH@/components/extensions.xpt
 @BINPATH@/components/exthandler.xpt
 @BINPATH@/components/fastfind.xpt
 @BINPATH@/components/feeds.xpt
 @BINPATH@/components/gfx.xpt
 @BINPATH@/components/html5.xpt
 @BINPATH@/components/htmlparser.xpt
 @BINPATH@/components/imglib2.xpt
 @BINPATH@/components/inspector.xpt
 @BINPATH@/components/intl.xpt
 @BINPATH@/components/jar.xpt
 @BINPATH@/components/jsdebugger.xpt
-@BINPATH@/components/jsdownloads.xpt
 @BINPATH@/components/jsinspector.xpt
 @BINPATH@/components/layout_base.xpt
 #ifdef NS_PRINTING
 @BINPATH@/components/layout_printing.xpt
 #endif
 @BINPATH@/components/layout_xul_tree.xpt
 @BINPATH@/components/layout_xul.xpt
 @BINPATH@/components/locale.xpt
--- a/testing/runtimes/mochitest-browser-chrome.runtimes.json
+++ b/testing/runtimes/mochitest-browser-chrome.runtimes.json
@@ -800,17 +800,17 @@
     "security/manager/ssl/tests/mochitest/browser/browser_certViewer.js": 3220,
     "security/manager/ssl/tests/mochitest/browser/browser_clientAuth_connection.js": 2066,
     "services/fxaccounts/tests/browser/browser_device_connected.js": 3094,
     "services/fxaccounts/tests/browser/browser_verify_login.js": 1763,
     "toolkit/components/aboutperformance/tests/browser/browser_aboutperformance.js": 6246,
     "toolkit/components/addoncompat/tests/browser/browser_addonShims.js": 3823,
     "toolkit/components/extensions/test/browser/browser_ext_management_themes.js": 2922,
     "toolkit/components/extensions/test/browser/browser_ext_themes_persistence.js": 1948,
-    "toolkit/components/jsdownloads/test/browser/browser_DownloadPDFSaver.js": 4102,
+    "toolkit/components/downloads/test/browser/browser_DownloadPDFSaver.js": 4102,
     "toolkit/components/narrate/test/browser_narrate.js": 2700,
     "toolkit/components/narrate/test/browser_voiceselect.js": 2254,
     "toolkit/components/narrate/test/browser_word_highlight.js": 2215,
     "toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger.js": 15909,
     "toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger_httpsUpgrade.js": 3296,
     "toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger_window_open.js": 4673,
     "toolkit/components/passwordmgr/test/browser/browser_context_menu.js": 12686,
     "toolkit/components/passwordmgr/test/browser/browser_context_menu_autocomplete_interaction.js": 3297,
--- a/toolkit/components/build/moz.build
+++ b/toolkit/components/build/moz.build
@@ -15,19 +15,19 @@ SOURCES += [
     'nsToolkitCompsModule.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../../xre',
     '../alerts',
+    '../downloads',
     '../feeds',
     '../find',
-    '../jsdownloads/src',
     '../perfmonitoring',
     '../protobuf',
     '../reputationservice',
     '../startup',
     '../statusfilter',
     '../typeaheadfind',
     '../url-classifier',
 ]
rename from toolkit/components/jsdownloads/src/DownloadCore.jsm
rename to toolkit/components/downloads/DownloadCore.jsm
rename from toolkit/components/jsdownloads/src/DownloadHistory.jsm
rename to toolkit/components/downloads/DownloadHistory.jsm
rename from toolkit/components/jsdownloads/src/DownloadIntegration.jsm
rename to toolkit/components/downloads/DownloadIntegration.jsm
rename from toolkit/components/jsdownloads/src/DownloadLegacy.js
rename to toolkit/components/downloads/DownloadLegacy.js
rename from toolkit/components/jsdownloads/src/DownloadList.jsm
rename to toolkit/components/downloads/DownloadList.jsm
rename from toolkit/components/jsdownloads/src/DownloadPaths.jsm
rename to toolkit/components/downloads/DownloadPaths.jsm
rename from toolkit/components/jsdownloads/src/DownloadPlatform.cpp
rename to toolkit/components/downloads/DownloadPlatform.cpp
--- a/toolkit/components/jsdownloads/src/DownloadPlatform.cpp
+++ b/toolkit/components/downloads/DownloadPlatform.cpp
@@ -22,17 +22,17 @@
 #ifdef XP_WIN
 #include <shlobj.h>
 #include <urlmon.h>
 #include "nsILocalFileWin.h"
 #endif
 
 #ifdef XP_MACOSX
 #include <CoreFoundation/CoreFoundation.h>
-#include "../../../../xpcom/io/CocoaFileUtils.h"
+#include "../../../xpcom/io/CocoaFileUtils.h"
 #endif
 
 #ifdef MOZ_WIDGET_ANDROID
 #include "FennecJNIWrappers.h"
 #endif
 
 #ifdef MOZ_WIDGET_GTK
 #include <gtk/gtk.h>
rename from toolkit/components/jsdownloads/src/DownloadPlatform.h
rename to toolkit/components/downloads/DownloadPlatform.h
rename from toolkit/components/jsdownloads/src/DownloadStore.jsm
rename to toolkit/components/downloads/DownloadStore.jsm
rename from toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
rename to toolkit/components/downloads/DownloadUIHelper.jsm
rename from toolkit/components/jsdownloads/src/Downloads.jsm
rename to toolkit/components/downloads/Downloads.jsm
rename from toolkit/components/jsdownloads/src/Downloads.manifest
rename to toolkit/components/downloads/Downloads.manifest
rename from toolkit/components/jsdownloads/src/moz.build
rename to toolkit/components/downloads/moz.build
--- a/toolkit/components/jsdownloads/src/moz.build
+++ b/toolkit/components/downloads/moz.build
@@ -1,14 +1,30 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
+BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
+
+TEST_HARNESS_FILES.xpcshell.toolkit.components.downloads.test.data += [
+    'test/data/empty.txt',
+    'test/data/source.txt',
+]
+
+XPIDL_SOURCES += [
+    'mozIDownloadPlatform.idl',
+]
+
+XPIDL_MODULE = 'downloads'
+
+CXXFLAGS += CONFIG['TK_CFLAGS']
+
 SOURCES += [
     'DownloadPlatform.cpp',
 ]
 
 EXTRA_COMPONENTS += [
     'DownloadLegacy.js',
     'Downloads.manifest',
 ]
@@ -25,9 +41,10 @@ EXTRA_JS_MODULES += [
 
 if CONFIG['MOZ_PLACES']:
     EXTRA_JS_MODULES += [
         'DownloadHistory.jsm',
     ]
 
 FINAL_LIBRARY = 'xul'
 
-CXXFLAGS += CONFIG['TK_CFLAGS']
+with Files('**'):
+    BUG_COMPONENT = ('Toolkit', 'Download Manager')
rename from toolkit/components/jsdownloads/public/mozIDownloadPlatform.idl
rename to toolkit/components/downloads/mozIDownloadPlatform.idl
rename from toolkit/components/jsdownloads/test/browser/.eslintrc.js
rename to toolkit/components/downloads/test/browser/.eslintrc.js
rename from toolkit/components/jsdownloads/test/browser/browser.ini
rename to toolkit/components/downloads/test/browser/browser.ini
rename from toolkit/components/jsdownloads/test/browser/browser_DownloadPDFSaver.js
rename to toolkit/components/downloads/test/browser/browser_DownloadPDFSaver.js
rename from toolkit/components/jsdownloads/test/browser/head.js
rename to toolkit/components/downloads/test/browser/head.js
rename from toolkit/components/jsdownloads/test/browser/testFile.html
rename to toolkit/components/downloads/test/browser/testFile.html
rename from toolkit/components/jsdownloads/test/data/.eslintrc.js
rename to toolkit/components/downloads/test/data/.eslintrc.js
rename from toolkit/components/jsdownloads/test/data/empty.txt
rename to toolkit/components/downloads/test/data/empty.txt
rename from toolkit/components/jsdownloads/test/data/source.txt
rename to toolkit/components/downloads/test/data/source.txt
rename from toolkit/components/jsdownloads/test/unit/.eslintrc.js
rename to toolkit/components/downloads/test/unit/.eslintrc.js
rename from toolkit/components/jsdownloads/test/unit/common_test_Download.js
rename to toolkit/components/downloads/test/unit/common_test_Download.js
rename from toolkit/components/jsdownloads/test/unit/head.js
rename to toolkit/components/downloads/test/unit/head.js
rename from toolkit/components/jsdownloads/test/unit/test_DownloadCore.js
rename to toolkit/components/downloads/test/unit/test_DownloadCore.js
rename from toolkit/components/jsdownloads/test/unit/test_DownloadHistory.js
rename to toolkit/components/downloads/test/unit/test_DownloadHistory.js
rename from toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js
rename to toolkit/components/downloads/test/unit/test_DownloadIntegration.js
rename from toolkit/components/jsdownloads/test/unit/test_DownloadLegacy.js
rename to toolkit/components/downloads/test/unit/test_DownloadLegacy.js
rename from toolkit/components/jsdownloads/test/unit/test_DownloadList.js
rename to toolkit/components/downloads/test/unit/test_DownloadList.js
rename from toolkit/components/jsdownloads/test/unit/test_DownloadPaths.js
rename to toolkit/components/downloads/test/unit/test_DownloadPaths.js
rename from toolkit/components/jsdownloads/test/unit/test_DownloadStore.js
rename to toolkit/components/downloads/test/unit/test_DownloadStore.js
rename from toolkit/components/jsdownloads/test/unit/test_Downloads.js
rename to toolkit/components/downloads/test/unit/test_Downloads.js
rename from toolkit/components/jsdownloads/test/unit/test_PrivateTemp.js
rename to toolkit/components/downloads/test/unit/test_PrivateTemp.js
rename from toolkit/components/jsdownloads/test/unit/xpcshell.ini
rename to toolkit/components/downloads/test/unit/xpcshell.ini
deleted file mode 100644
--- a/toolkit/components/jsdownloads/moz.build
+++ /dev/null
@@ -1,18 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-with Files('*'):
-    BUG_COMPONENT = ('Toolkit', 'Download Manager')
-
-DIRS += ['public', 'src']
-
-XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
-BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
-
-TEST_HARNESS_FILES.xpcshell.toolkit.components.jsdownloads.test.data += [
-    'test/data/empty.txt',
-    'test/data/source.txt',
-]
deleted file mode 100644
--- a/toolkit/components/jsdownloads/public/moz.build
+++ /dev/null
@@ -1,9 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-XPIDL_MODULE = 'jsdownloads'
-
-XPIDL_SOURCES += [
-    'mozIDownloadPlatform.idl',
-]
--- a/toolkit/components/moz.build
+++ b/toolkit/components/moz.build
@@ -24,22 +24,22 @@ DIRS += [
     'browser',
     'cloudstorage',
     'commandlines',
     'contentprefs',
     'contextualidentity',
     'crashes',
     'crashmonitor',
     'diskspacewatcher',
+    'downloads',
     'enterprisepolicies',
     'extensions',
     'filewatcher',
     'finalizationwitness',
     'find',
-    'jsdownloads',
     'jsoncpp/src/lib_json',
     'lz4',
     'mediasniffer',
     'microformats',
     'mozintl',
     'mozprotocol',
     'osfile',
     'parentalcontrols',
--- a/toolkit/content/contentAreaUtils.js
+++ b/toolkit/content/contentAreaUtils.js
@@ -751,17 +751,17 @@ function uniqueFile(aLocalFile) {
       // replace the last (n) in the filename with (n+1)
       aLocalFile.leafName = aLocalFile.leafName.replace(/^(.*\()\d+\)/, "$1" + (collisionCount + 1) + ")");
     }
   }
   return aLocalFile;
 }
 
 /**
- * Download a URL using the new jsdownloads API.
+ * Download a URL using the Downloads API.
  *
  * @param aURL
  *        the url to download
  * @param [optional] aFileName
  *        the destination file name, if omitted will be obtained from the url.
  * @param aInitiatingDocument
  *        The document from which the download was initiated.
  */