Backed out changeset 32d1752fb7ba (bug 786095)

This commit is contained in:
Jared Wein 2012-09-24 16:03:59 -07:00
parent ff540847c2
commit a1824208ff
3 changed files with 3 additions and 15 deletions

View File

@ -80,10 +80,6 @@ let SocialUI = {
let accesskey = gNavigatorBundle.getString("social.toggle.accesskey");
toggleCommand.setAttribute("label", label);
toggleCommand.setAttribute("accesskey", accesskey);
// Override the normal 'checked' state set by updateToggleCommand
// when in safe mode so the feature can be disabled.
if (Services.appinfo.inSafeMode)
toggleCommand.setAttribute("checked", Services.prefs.getBoolPref("social.enabled"));
SocialToolbar.init();
SocialShareButton.init();

View File

@ -19,10 +19,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "SocialService",
let Social = {
lastEventReceived: 0,
provider: null,
_disabledForSafeMode: false,
init: function Social_init(callback) {
this._disabledForSafeMode = Services.appinfo.inSafeMode && this.enabled;
if (this.provider) {
schedule(callback);
return;
@ -57,8 +54,7 @@ let Social = {
},
toggle: function Social_toggle() {
this.enabled = this._disabledForSafeMode ? true : !this.enabled;
this._disabledForSafeMode = false;
this.enabled = !this.enabled;
},
toggleSidebar: function SocialSidebar_toggle() {

View File

@ -63,7 +63,7 @@ XPCOMUtils.defineLazyGetter(SocialServiceInternal, "providers", function () {
try {
var manifest = JSON.parse(MANIFEST_PREFS.getCharPref(pref));
if (manifest && typeof(manifest) == "object") {
let provider = new SocialProvider(manifest, Services.appinfo.inSafeMode ? false : SocialServiceInternal.enabled);
let provider = new SocialProvider(manifest, SocialServiceInternal.enabled);
providers[provider.origin] = provider;
}
} catch (err) {
@ -86,11 +86,7 @@ const SocialService = {
},
set enabled(val) {
let enable = !!val;
// Allow setting to the same value when in safe mode so the
// feature can be force enabled.
if (enable == SocialServiceInternal.enabled &&
!Services.appinfo.inSafeMode)
if (enable == SocialServiceInternal.enabled)
return;
Services.prefs.setBoolPref("social.enabled", enable);