зеркало из https://github.com/mozilla/gecko-dev.git
Bug 663253: Remove the 'browser.offline' preference (don't remember offline mode from the previous session). r=gavin
This commit is contained in:
Родитель
47d6f4ca82
Коммит
90481c4587
|
@ -5919,10 +5919,6 @@ var BrowserOffline = {
|
||||||
}
|
}
|
||||||
|
|
||||||
ioService.offline = !ioService.offline;
|
ioService.offline = !ioService.offline;
|
||||||
|
|
||||||
// Save the current state for later use as the initial state
|
|
||||||
// (if there is no netLinkService)
|
|
||||||
gPrefService.setBoolPref("browser.offline", ioService.offline);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -350,19 +350,6 @@ BrowserGlue.prototype = {
|
||||||
// handle any UI migration
|
// handle any UI migration
|
||||||
this._migrateUI();
|
this._migrateUI();
|
||||||
|
|
||||||
// if ioService is managing the offline status, then ioservice.offline
|
|
||||||
// is already set correctly. We will continue to allow the ioService
|
|
||||||
// to manage its offline state until the user uses the "Work Offline" UI.
|
|
||||||
if (!Services.io.manageOfflineStatus) {
|
|
||||||
// set the initial state
|
|
||||||
try {
|
|
||||||
Services.io.offline = Services.prefs.getBoolPref("browser.offline");
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
Services.io.offline = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Services.obs.notifyObservers(null, "browser-ui-startup-complete", "");
|
Services.obs.notifyObservers(null, "browser-ui-startup-complete", "");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ function test() {
|
||||||
function download_progress(addon, value, maxValue) {
|
function download_progress(addon, value, maxValue) {
|
||||||
try {
|
try {
|
||||||
Services.io.manageOfflineStatus = false;
|
Services.io.manageOfflineStatus = false;
|
||||||
Services.prefs.setBoolPref("browser.offline", true);
|
|
||||||
Services.io.offline = true;
|
Services.io.offline = true;
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
}
|
}
|
||||||
|
@ -37,7 +36,6 @@ function finish_test(count) {
|
||||||
|
|
||||||
is(count, 0, "No add-ons should have been installed");
|
is(count, 0, "No add-ons should have been installed");
|
||||||
try {
|
try {
|
||||||
Services.prefs.setBoolPref("browser.offline", false);
|
|
||||||
Services.io.offline = false;
|
Services.io.offline = false;
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,10 +67,7 @@ public:
|
||||||
* for NetworkManager state changes; we set nsIOService's offline status to
|
* for NetworkManager state changes; we set nsIOService's offline status to
|
||||||
* FALSE when NetworkManager reports NM_STATE_CONNECTED, and to TRUE otherwise.
|
* FALSE when NetworkManager reports NM_STATE_CONNECTED, and to TRUE otherwise.
|
||||||
* We also solicit the current status from NetworkManager when this component
|
* We also solicit the current status from NetworkManager when this component
|
||||||
* gets loaded. In addition to setting IOService, we also set the
|
* gets loaded.
|
||||||
* "browser.offline" preference (because Firefox treats that preference as
|
|
||||||
* authoritative). We have to wait until prefs have been loaded before setting
|
|
||||||
* "browser.offline".
|
|
||||||
*
|
*
|
||||||
* In the future we could extend this class to talk to other daemons.
|
* In the future we could extend this class to talk to other daemons.
|
||||||
*
|
*
|
||||||
|
|
Загрузка…
Ссылка в новой задаче