Bug 636223 - Clear Private Data should disconnect Fennec from Sync [r=mfinkle]
--- a/mobile/app/mobile.js
+++ b/mobile/app/mobile.js
@@ -305,17 +305,16 @@ pref("browser.urlbar.match.title", "#");
pref("browser.urlbar.match.url", "@");
pref("browser.urlbar.autocomplete.search_threshold", 5);
pref("browser.history.grouping", "day");
pref("browser.history.showSessions", false);
pref("browser.sessionhistory.max_entries", 50);
pref("browser.history_expire_days", 180);
pref("browser.history_expire_days_min", 90);
pref("browser.history_expire_sites", 40000);
-pref("privacy.item.history", true);
pref("browser.places.migratePostDataAnnotations", true);
pref("browser.places.updateRecentTagsUri", true);
pref("places.frecency.numVisits", 10);
pref("places.frecency.numCalcOnIdle", 50);
pref("places.frecency.numCalcOnMigrate", 50);
pref("places.frecency.updateIdleTime", 60000);
pref("places.frecency.firstBucketCutoff", 4);
pref("places.frecency.secondBucketCutoff", 14);
@@ -359,16 +358,17 @@ pref("privacy.item.cookies", true);
pref("privacy.item.offlineApps", true);
pref("privacy.item.history", true);
pref("privacy.item.formdata", true);
pref("privacy.item.downloads", true);
pref("privacy.item.passwords", true);
pref("privacy.item.sessions", true);
pref("privacy.item.geolocation", true);
pref("privacy.item.siteSettings", true);
+pref("privacy.item.syncAccount", true);
#ifdef MOZ_PLATFORM_MAEMO
pref("plugins.force.wmode", "opaque");
#endif
// URL to the Learn More link XXX this is the firefox one. Bug 495578 fixes this.
pref("browser.geolocation.warning.infoURL", "http://www.mozilla.com/%LOCALE%/firefox/geolocation/");
--- a/mobile/chrome/content/sanitize.js
+++ b/mobile/chrome/content/sanitize.js
@@ -275,16 +275,29 @@ Sanitizer.prototype = {
var authMgr = Cc['@mozilla.org/network/http-auth-manager;1'].getService(Ci.nsIHttpAuthManager);
authMgr.clearAll();
},
get canClear()
{
return true;
}
+ },
+
+ syncAccount: {
+ clear: function ()
+ {
+ WeaveGlue.disconnect();
+ },
+
+ get canClear()
+ {
+ let autoconnect = Services.prefs.getBoolPref("services.sync.autoconnect");
+ return autoconnect || Weave.Service.isLoggedIn;
+ }
}
}
};
// "Static" members
Sanitizer.prefDomain = "privacy.sanitize.";
Sanitizer.prefShutdown = "sanitizeOnShutdown";