Bug 663253: Remove the 'browser.offline' preference (don't remember offline mode from the previous session). r=gavin

This commit is contained in:
Steffen Wilberg 2011-06-21 22:23:26 +02:00
Родитель 47d6f4ca82
Коммит 90481c4587
4 изменённых файлов: 1 добавлений и 23 удалений

Просмотреть файл

@ -5919,10 +5919,6 @@ var BrowserOffline = {
}
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
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", "");
},

Просмотреть файл

@ -18,7 +18,6 @@ function test() {
function download_progress(addon, value, maxValue) {
try {
Services.io.manageOfflineStatus = false;
Services.prefs.setBoolPref("browser.offline", true);
Services.io.offline = true;
} catch (ex) {
}
@ -37,7 +36,6 @@ function finish_test(count) {
is(count, 0, "No add-ons should have been installed");
try {
Services.prefs.setBoolPref("browser.offline", false);
Services.io.offline = false;
} catch (ex) {
}

Просмотреть файл

@ -67,10 +67,7 @@ public:
* for NetworkManager state changes; we set nsIOService's offline status to
* FALSE when NetworkManager reports NM_STATE_CONNECTED, and to TRUE otherwise.
* We also solicit the current status from NetworkManager when this component
* gets loaded. In addition to setting IOService, we also set the
* "browser.offline" preference (because Firefox treats that preference as
* authoritative). We have to wait until prefs have been loaded before setting
* "browser.offline".
* gets loaded.
*
* In the future we could extend this class to talk to other daemons.
*