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 250379 b31df8fa73a5
parent 250378 ff5485e89210
child 250380 7caca8a3e78f
push id4569
push userryanvm@gmail.com
push date2015-03-13 20:45 +0000
treeherdermozilla-beta@b31df8fa73a5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman, sledru
bugs1142459, 1140830
milestone37.0
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() {