Bug 1491275 - Remove no-longer-used DownloadsStartup.js. r=jorgk
authorGeoff Lankow <geoff@darktrojan.net>
Sat, 15 Sep 2018 00:02:28 +1200
changeset 33152 3643f8b54e3412c4a7bc5fb89a089e482253b769
parent 33151 c35b35b70424b71cbb69b4ec88003a00337d4629
child 33153 b5438a85767acdfa26aaa60f532d3f8e4bee979b
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersjorgk
bugs1491275
Bug 1491275 - Remove no-longer-used DownloadsStartup.js. r=jorgk
mail/components/DownloadsStartup.js
mail/components/mailComponents.manifest
mail/components/moz.build
mail/installer/package-manifest.in
deleted file mode 100644
--- a/mail/components/DownloadsStartup.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80 filetype=javascript: */
-/* 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/. */
-
-/**
- * This component enables the JavaScript API for downloads at startup.  This
- * will eventually be removed when nsIDownloadManager will not be available
- * anymore (bug 851471).
- */
-
-"use strict";
-
-////////////////////////////////////////////////////////////////////////////////
-//// Globals
-
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "DownloadIntegration",
-                               "resource://gre/modules/DownloadIntegration.jsm");
-
-/**
- * CID and Contract ID of the JavaScript implementation of nsITransfer.
- */
-var kTransferCid = Components.ID("{1b4c85df-cbdd-4bb6-b04e-613caece083c}");
-var kTransferContractId = "@mozilla.org/transfer;1";
-
-////////////////////////////////////////////////////////////////////////////////
-//// DownloadsStartup
-
-function DownloadsStartup() { }
-
-DownloadsStartup.prototype = {
-  classID: Components.ID("{a93f0d6f-02a3-4486-a662-8f49b8c1de48}"),
-
-  _xpcom_factory: XPCOMUtils.generateSingletonFactory(DownloadsStartup),
-
-  //////////////////////////////////////////////////////////////////////////////
-  //// nsISupports
-
-  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
-
-  //////////////////////////////////////////////////////////////////////////////
-  //// nsIObserver
-
-  observe: function DS_observe(aSubject, aTopic, aData)
-  {
-    if (aTopic != "profile-after-change") {
-      Cu.reportError("Unexpected observer notification.");
-      return;
-    }
-
-    // Override Toolkit's nsITransfer implementation with the one from the
-    // JavaScript API for downloads.
-    Components.manager.QueryInterface(Ci.nsIComponentRegistrar)
-                      .registerFactory(kTransferCid, "",
-                                       kTransferContractId, null);
-
-    // To preserve download list across sessions.
-    DownloadIntegration.shouldPersistDownload = function(aDownload) {
-      return true;
-    };
-
-  },
-};
-
-////////////////////////////////////////////////////////////////////////////////
-//// Module
-
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([DownloadsStartup]);
--- a/mail/components/mailComponents.manifest
+++ b/mail/components/mailComponents.manifest
@@ -15,12 +15,8 @@ category command-line-validator b-defaul
 
 component {1c73f03a-b817-4640-b984-18c3478a9ae3} mailContentHandler.js
 contract @mozilla.org/uriloader/content-handler;1?type=text/html {1c73f03a-b817-4640-b984-18c3478a9ae3}
 contract @mozilla.org/uriloader/content-handler;1?type=text/plain {1c73f03a-b817-4640-b984-18c3478a9ae3}
 
 component {eb239c82-fac9-431e-98d7-11cacd0f71b8} mailGlue.js
 contract @mozilla.org/mail/mailglue;1 {eb239c82-fac9-431e-98d7-11cacd0f71b8}
 category app-startup MailGlue service,@mozilla.org/mail/mailglue;1
-
-component {a93f0d6f-02a3-4486-a662-8f49b8c1de48} DownloadsStartup.js
-contract @mozilla.org/mail/downloadsstartup;1 {a93f0d6f-02a3-4486-a662-8f49b8c1de48}
-category profile-after-change DownloadsStartup @mozilla.org/mail/downloadsstartup;1
--- a/mail/components/moz.build
+++ b/mail/components/moz.build
@@ -31,17 +31,16 @@ DIRS += ['build']
 XPIDL_SOURCES += [
     'nsIMailGlue.idl',
 ]
 
 XPIDL_MODULE = 'mailcompsbase'
 
 EXTRA_COMPONENTS += [
     'aboutRedirector.js',
-    'DownloadsStartup.js',
     'mailComponents.manifest',
     'mailContentHandler.js',
     'mailGlue.js',
     'nsMailDefaultHandler.js',
 ]
 
 EXTRA_JS_MODULES += [
     'appIdleManager.js',
--- a/mail/installer/package-manifest.in
+++ b/mail/installer/package-manifest.in
@@ -337,19 +337,16 @@
 @RESPATH@/components/nsAbLDAPAutoCompleteSearch.js
 @RESPATH@/components/nsLDAPProtocolHandler.js
 @RESPATH@/components/ldapComponents.manifest
 @BINPATH@/@DLL_PREFIX@ldap60@DLL_SUFFIX@
 @BINPATH@/@DLL_PREFIX@ldif60@DLL_SUFFIX@
 @BINPATH@/@DLL_PREFIX@prldap60@DLL_SUFFIX@
 #endif
 
-; download progress for downloads
-@RESPATH@/components/DownloadsStartup.js
-
 ; Protocol/Content handling
 @RESPATH@/components/nsSMTPProtocolHandler.js
 @RESPATH@/components/nsSMTPProtocolHandler.manifest
 
 ; misson control, autoconfig
 #ifdef MOZ_PREF_EXTENSIONS
 @RESPATH@/defaults/autoconfig/prefcalls.js
 #endif