Backed out changeset 3a4ed2b028ad (bug 736278)
authorJared Wein <jwein@mozilla.com>
Tue, 27 Mar 2012 15:20:32 -0700
changeset 93776 591720c6e34589b8a7edd47c7266d46a2b2e6c95
parent 93775 f8e563013a6102a5d03bb9248a8188cf1e1fd1f0
child 93777 15930226f98ba005aa9afcf3238893401b2c18a1
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs736278
milestone14.0a1
backs out3a4ed2b028ad63845bb6324a6556d8864616c356
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
Backed out changeset 3a4ed2b028ad (bug 736278)
mobile/android/chrome/content/browser.js
mobile/android/locales/en-US/chrome/browser.properties
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -3920,63 +3920,33 @@ var ClipboardHelper = {
       }
       return false;
     }
   }
 };
 
 var PluginHelper = {
   showDoorHanger: function(aTab) {
-    if (!aTab.browser)
-      return;
-
-    // Even though we may not end up showing a doorhanger, this flag
-    // lets us know that we've tried to show a doorhanger.
     aTab.clickToPlayPluginDoorhangerShown = true;
-
-    let uri = aTab.browser.currentURI;
-
-    // If the user has previously set a plugins permission for this website,
-    // either play or don't play the plugins instead of showing a doorhanger.
-    let permValue = Services.perms.testPermission(uri, "plugins");
-    if (permValue != Services.perms.UNKNOWN_ACTION) {
-      if (permValue == Services.perms.ALLOW_ACTION)
-        PluginHelper.playAllPlugins(aTab.browser.contentWindow);
-
-      return;
-    }
-
-    let message = Strings.browser.formatStringFromName("clickToPlayPlugins.message1",
-                                                       [uri.host], 1);
+    let message = Strings.browser.GetStringFromName("clickToPlayPlugins.message");
     let buttons = [
       {
         label: Strings.browser.GetStringFromName("clickToPlayPlugins.yes"),
-        callback: function(aChecked) {
-          // If the user checked "Don't ask again", make a permanent exception
-          if (aChecked)
-            Services.perms.add(uri, "plugins", Ci.nsIPermissionManager.ALLOW_ACTION);
-
+        callback: function() {
           PluginHelper.playAllPlugins(aTab.browser.contentWindow);
         }
       },
       {
         label: Strings.browser.GetStringFromName("clickToPlayPlugins.no"),
-        callback: function(aChecked) {
-          // If the user checked "Don't ask again", make a permanent exception
-          if (aChecked)
-            Services.perms.add(uri, "plugins", Ci.nsIPermissionManager.DENY_ACTION);
-
-          // Other than that, do nothing
+        callback: function() {
+          // Do nothing
+        }
       }
-    ];
-
-    // Add a checkbox with a "Don't ask again" message
-    let options = { checkbox: Strings.browser.GetStringFromName("clickToPlayPlugins.dontAskAgain") };
-
-    NativeWindow.doorhanger.show(message, "ask-to-play-plugins", buttons, aTab.id, options);
+    ]
+    NativeWindow.doorhanger.show(message, "ask-to-play-plugins", buttons, aTab.id);
   },
 
   playAllPlugins: function(aContentWindow) {
     let cwu = aContentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                             .getInterface(Ci.nsIDOMWindowUtils);
     // XXX not sure if we should enable plugins for the parent documents...
     let plugins = cwu.plugins;
     if (!plugins || !plugins.length)
@@ -4028,17 +3998,17 @@ var PluginHelper = {
 
     return overflows;
   }
 };
 
 var PermissionsHelper = {
 
   _permissonTypes: ["password", "geolocation", "popup", "indexedDB",
-                    "offline-app", "desktop-notification", "plugins"],
+                    "offline-app", "desktop-notification"],
   _permissionStrings: {
     "password": {
       label: "password.rememberPassword",
       allowed: "password.remember",
       denied: "password.never"
     },
     "geolocation": {
       label: "geolocation.shareLocation",
@@ -4059,21 +4029,16 @@ var PermissionsHelper = {
       label: "offlineApps.storeOfflineData",
       allowed: "offlineApps.allow",
       denied: "offlineApps.never"
     },
     "desktop-notification": {
       label: "desktopNotification.useNotifications",
       allowed: "desktopNotification.allow",
       denied: "desktopNotification.dontAllow"
-    },
-    "plugins": {
-      label: "clickToPlayPlugins.playPlugins",
-      allowed: "clickToPlayPlugins.yes",
-      denied: "clickToPlayPlugins.no"
     }
   },
 
   init: function init() {
     Services.obs.addObserver(this, "Permissions:Get", false);
     Services.obs.addObserver(this, "Permissions:Clear", false);
   },
 
--- a/mobile/android/locales/en-US/chrome/browser.properties
+++ b/mobile/android/locales/en-US/chrome/browser.properties
@@ -221,25 +221,19 @@ stacktrace.outputMessage=Stack trace fro
 timer.start=%S: timer started
 
 # LOCALIZATION NOTE (timer.end):
 # This string is used to display the result of the console.timeEnd() call.
 # %1$S=name of timer, %2$S=number of milliseconds
 timer.end=%1$S: %2$Sms
 
 # Click to play plugins
-clickToPlayPlugins.message1=%S contains plugin content. Would you like to play it?
+clickToPlayPlugins.message=This page contains plugin content. Would you like to play it?
 clickToPlayPlugins.yes=Yes
 clickToPlayPlugins.no=No
-# LOCALIZATION NOTE (clickToPlayPlugins.dontAskAgain): This label appears next to a
-# checkbox to indicate whether or not the user wants to make a permanent decision.
-clickToPlayPlugins.dontAskAgain=Don't ask again for this site
-# LOCALIZATION NOTE (clickToPlayPlugins.playPlugins): Label that
-# will be used in site settings dialog.
-clickToPlayPlugins.playPlugins=Play Plugins
 
 # Site settings dialog
 # LOCALIZATION NOTE (siteSettings.labelToValue): This string will be used to
 # dislay a list of current permissions settings for a site.
 # Example: "Store Offline Data: Allow"
 siteSettings.labelToValue=%S: %S
 
 masterPassword.incorrect=Incorrect password