Bug 1142459 - Fix mixed content shield notification broke by bug 1140830. r=rnewman, a=sledru
authorJames Willcox <snorp@snorp.net>
Thu, 12 Mar 2015 15:21:43 -0500
changeset 245466 7c51bb7366b3
parent 245465 a541bb82052f
child 245467 4da60a288000
child 245469 2b1ecc5fad12
push id686
push userryanvm@gmail.com
push date2015-03-13 20:45 +0000
treeherdermozilla-release@7c51bb7366b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman, sledru
bugs1142459, 1140830
milestone36.0.2
Bug 1142459 - Fix mixed content shield notification broke by bug 1140830. r=rnewman, a=sledru
mobile/android/base/SiteIdentity.java
--- a/mobile/android/base/SiteIdentity.java
+++ b/mobile/android/base/SiteIdentity.java
@@ -117,23 +117,27 @@ public class SiteIdentity {
             return mId;
         }
     }
 
     public SiteIdentity() {
         reset();
     }
 
-    public void reset() {
+    public void resetIdentity() {
         mSecurityMode = SecurityMode.UNKNOWN;
         mHost = null;
         mOwner = null;
         mSupplemental = null;
         mVerifier = null;
         mEncrypted = null;
+    }
+
+    public void reset() {
+        resetIdentity();
         mMixedMode = MixedMode.UNKNOWN;
         mTrackingMode = TrackingMode.UNKNOWN;
     }
 
     void update(JSONObject identityData) {
         if (identityData == null) {
             reset();
             return;
@@ -152,33 +156,31 @@ public class SiteIdentity {
                 mTrackingMode = TrackingMode.fromString(mode.getString("tracking"));
             } catch (Exception e) {
                 mTrackingMode = TrackingMode.UNKNOWN;
             }
 
             try {
                 mSecurityMode = SecurityMode.fromString(mode.getString("identity"));
             } catch (Exception e) {
-                reset();
+                resetIdentity();
                 return;
             }
 
             try {
                 mHost = identityData.getString("host");
                 mOwner = identityData.optString("owner", null);
                 mSupplemental = identityData.optString("supplemental", null);
                 mVerifier = identityData.getString("verifier");
                 mEncrypted = identityData.getString("encrypted");
             } catch (Exception e) {
-                reset();
+                resetIdentity();
             }
         } catch (Exception e) {
             reset();
-            mMixedMode = MixedMode.UNKNOWN;
-            mTrackingMode = TrackingMode.UNKNOWN;
         }
     }
 
     public SecurityMode getSecurityMode() {
         return mSecurityMode;
     }
 
     public String getHost() {