Bug 1188699 - Remove unused code for temporarily overriding Active Mixed Content blocking. r=nalexander
authorChenxia Liu <liuche@mozilla.com>
Thu, 06 Aug 2015 18:34:07 -0700
changeset 288576 2e9102e4b0a6b9004a9c7ff44191216df8777e97
parent 288575 785195348eb8b66916f3157f768f3dcfe886ab79
child 288577 022d23085f3011083401683eab7cc410c0bda3d1
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1188699
milestone42.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 1188699 - Remove unused code for temporarily overriding Active Mixed Content blocking. r=nalexander
mobile/android/base/widget/ContentSecurityDoorHanger.java
mobile/android/base/widget/DoorHanger.java
mobile/android/chrome/content/browser.js
--- a/mobile/android/base/widget/ContentSecurityDoorHanger.java
+++ b/mobile/android/base/widget/ContentSecurityDoorHanger.java
@@ -95,20 +95,16 @@ public class ContentSecurityDoorHanger e
     @Override
     protected OnClickListener makeOnButtonClickListener(final int id) {
         return new Button.OnClickListener() {
             @Override
             public void onClick(View v) {
                 final JSONObject response = new JSONObject();
                 try {
                     switch (mType) {
-                        case MIXED_CONTENT:
-                            response.put("allowContent", (id == SiteIdentityPopup.ButtonType.DISABLE.ordinal()));
-                            response.put("contentType", ("mixed"));
-                            break;
                         case TRACKING:
                             response.put("allowContent", (id == SiteIdentityPopup.ButtonType.DISABLE.ordinal()));
                             response.put("contentType", ("tracking"));
                             break;
                         default:
                             Log.w(LOGTAG, "Unknown doorhanger type " + mType.toString());
                     }
                 } catch (JSONException e) {
--- a/mobile/android/base/widget/DoorHanger.java
+++ b/mobile/android/base/widget/DoorHanger.java
@@ -23,23 +23,22 @@ import org.mozilla.gecko.Tabs;
 public abstract class DoorHanger extends LinearLayout {
 
     public static DoorHanger Get(Context context, DoorhangerConfig config) {
         final Type type = config.getType();
         switch (type) {
             case LOGIN:
                 return new LoginDoorHanger(context, config);
             case TRACKING:
-            case MIXED_CONTENT:
                 return new ContentSecurityDoorHanger(context, config, type);
         }
         return new DefaultDoorHanger(context, config, type);
     }
 
-    public static enum Type { DEFAULT, LOGIN, TRACKING, MIXED_CONTENT, GEOLOCATION }
+    public static enum Type { DEFAULT, LOGIN, TRACKING, GEOLOCATION }
 
     public interface OnButtonClickListener {
         public void onButtonClick(JSONObject response, DoorHanger doorhanger);
     }
 
     private static final String LOGTAG = "GeckoDoorHanger";
 
     // Divider between doorhangers.
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -1750,26 +1750,17 @@ var BrowserApp = {
           break;
 
       case "Session:Reload": {
         let flags = Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_PROXY | Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE;
 
         // Check to see if this is a message to enable/disable mixed content blocking.
         if (aData) {
           let data = JSON.parse(aData);
-          if (data.contentType === "mixed") {
-            if (data.allowContent) {
-              // Set a flag to disable mixed content blocking.
-              flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_MIXED_CONTENT;
-            } else {
-              // Set mixedContentChannel to null to re-enable mixed content blocking.
-              let docShell = browser.webNavigation.QueryInterface(Ci.nsIDocShell);
-              docShell.mixedContentChannel = null;
-            }
-          } else if (data.contentType === "tracking") {
+          if (data.contentType === "tracking") {
             // Convert document URI into the format used by
             // nsChannelClassifier::ShouldEnableTrackingProtection
             // (any scheme turned into https is correct)
             let normalizedUrl = Services.io.newURI("https://" + browser.currentURI.hostPort, null, null);
             if (data.allowContent) {
               // Add the current host in the 'trackingprotection' consumer of
               // the permission manager using a normalized URI. This effectively
               // places this host on the tracking protection white list.