Bug 1462796 - Remove unused Fennec BlockListPrompt component. draft
authorLuca Greco <lgreco@mozilla.com>
Fri, 25 May 2018 17:31:29 +0200
changeset 800644 b2d9f5671c5057fae0f617bb9a394c64d4cea692
parent 800491 a466172aed4bc2afc21169b749b8068a4b98c93f
push id111434
push userluca.greco@alcacoop.it
push dateMon, 28 May 2018 19:38:26 +0000
bugs1462796
milestone62.0a1
Bug 1462796 - Remove unused Fennec BlockListPrompt component. MozReview-Commit-ID: 84alzoMvcpV
mobile/android/components/BlocklistPrompt.js
mobile/android/components/MobileComponents.manifest
mobile/android/components/moz.build
mobile/android/installer/package-manifest.in
deleted file mode 100644
--- a/mobile/android/components/BlocklistPrompt.js
+++ /dev/null
@@ -1,57 +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/. */
-
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-// -----------------------------------------------------------------------
-// BlocklistPrompt Service
-// -----------------------------------------------------------------------
-
-
-function BlocklistPrompt() {
-  this.wrappedJSObject = this;
-}
-
-BlocklistPrompt.prototype = {
-  prompt: function(aAddons, aCount) {
-    let win = Services.wm.getMostRecentWindow("navigator:browser");
-    if (win.ExtensionsView.visible) {
-      win.ExtensionsView.showRestart("blocked");
-    } else {
-      let bundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
-      let notifyBox = win.getNotificationBox();
-      let restartCallback = function(aNotification, aDescription) {
-        // Notify all windows that an application quit has been requested
-        var cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
-        Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
-
-        // If nothing aborted, quit the app
-        if (!cancelQuit.data) {
-          Services.startup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit);
-        }
-      };
-
-      let buttons = [{accessKey: null,
-                      label: bundle.GetStringFromName("notificationRestart.button"),
-                      callback: restartCallback}];
-      notifyBox.appendNotification(bundle.GetStringFromName("notificationRestart.blocked"),
-                                   "blocked-add-on",
-                                   "",
-                                   "PRIORITY_CRITICAL_HIGH",
-                                   buttons);
-    }
-    // Disable softblocked items automatically
-    for (let i = 0; i < aAddons.length; i++) {
-      if (aAddons[i].item instanceof Ci.nsIPluginTag)
-        aAddons[i].item.disabled = true;
-      else
-        aAddons[i].item.disable();
-    }
-  },
-  classID: Components.ID("{4e6ea350-b09a-11df-94e2-0800200c9a66}"),
-  QueryInterface: ChromeUtils.generateQI([])
-};
-
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([BlocklistPrompt]);
--- a/mobile/android/components/MobileComponents.manifest
+++ b/mobile/android/components/MobileComponents.manifest
@@ -73,20 +73,16 @@ contract @mozilla.org/content-dispatch-c
 component {93c8824c-9b87-45ae-bc90-5b82a1e4d877} AddonUpdateService.js
 contract @mozilla.org/browser/addon-update-service;1 {93c8824c-9b87-45ae-bc90-5b82a1e4d877}
 category update-timer AddonUpdateService @mozilla.org/browser/addon-update-service;1,getService,auto-addon-background-update-timer,extensions.autoupdate.interval,86400
 
 # LoginManagerPrompter.js
 component {97d12931-abe2-11df-94e2-0800200c9a66} LoginManagerPrompter.js
 contract @mozilla.org/login-manager/prompter;1 {97d12931-abe2-11df-94e2-0800200c9a66}
 
-# BlocklistPrompt.js
-component {4e6ea350-b09a-11df-94e2-0800200c9a66} BlocklistPrompt.js
-contract @mozilla.org/addons/blocklist-prompt;1 {4e6ea350-b09a-11df-94e2-0800200c9a66}
-
 # NSSDialogService.js
 component {cbc08081-49b6-4561-9c18-a7707a50bda1} NSSDialogService.js
 contract @mozilla.org/nsCertificateDialogs;1 {cbc08081-49b6-4561-9c18-a7707a50bda1}
 contract @mozilla.org/nsClientAuthDialogs;1 {cbc08081-49b6-4561-9c18-a7707a50bda1}
 
 # FilePicker.js
 component {18a4e042-7c7c-424b-a583-354e68553a7f} FilePicker.js
 contract @mozilla.org/filepicker;1 {18a4e042-7c7c-424b-a583-354e68553a7f}
--- a/mobile/android/components/moz.build
+++ b/mobile/android/components/moz.build
@@ -14,17 +14,16 @@ XPIDL_SOURCES += [
     'SessionStore.idl',
 ]
 
 XPIDL_MODULE = 'MobileComponents'
 
 EXTRA_COMPONENTS += [
     'AboutRedirector.js',
     'AddonUpdateService.js',
-    'BlocklistPrompt.js',
     'BrowserCLH.js',
     'ColorPicker.js',
     'ContentDispatchChooser.js',
     'ContentPermissionPrompt.js',
     'DirectoryProvider.js',
     'FilePicker.js',
     'FxAccountsPush.js',
     'HelperAppDialog.js',
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -344,17 +344,16 @@
 @BINPATH@/components/GeckoViewPrompt.js
 @BINPATH@/components/GeckoViewPermission.js
 @BINPATH@/components/GeckoViewStartup.js
 #else
 @BINPATH@/chrome/chrome@JAREXT@
 @BINPATH@/chrome/chrome.manifest
 @BINPATH@/components/AboutRedirector.js
 @BINPATH@/components/AddonUpdateService.js
-@BINPATH@/components/BlocklistPrompt.js
 @BINPATH@/components/BrowserCLH.js
 @BINPATH@/components/ColorPicker.js
 @BINPATH@/components/ContentDispatchChooser.js
 @BINPATH@/components/ContentPermissionPrompt.js
 @BINPATH@/components/ImageBlockingPolicy.js
 @BINPATH@/components/DirectoryProvider.js
 @BINPATH@/components/FilePicker.js
 @BINPATH@/components/FxAccountsPush.js