mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-28 04:35:33 +00:00
Bug 479805: browser.offline should only be consulted during startup. r=dao
This commit is contained in:
parent
72a576fb4d
commit
93e942860c
@ -5296,20 +5296,6 @@ var BrowserOffline = {
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"].
|
||||
getService(Components.interfaces.nsIIOService2);
|
||||
|
||||
// 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 (!ioService.manageOfflineStatus) {
|
||||
// set the initial state
|
||||
var isOffline = false;
|
||||
try {
|
||||
isOffline = gPrefService.getBoolPref("browser.offline");
|
||||
}
|
||||
catch (e) { }
|
||||
ioService.offline = isOffline;
|
||||
}
|
||||
|
||||
this._updateOfflineUI(ioService.offline);
|
||||
},
|
||||
|
||||
|
@ -265,6 +265,22 @@ BrowserGlue.prototype = {
|
||||
// handle any UI migration
|
||||
this._migrateUI();
|
||||
|
||||
var ioService = Cc["@mozilla.org/network/io-service;1"].
|
||||
getService(Ci.nsIIOService2);
|
||||
|
||||
// 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 (!ioService.manageOfflineStatus) {
|
||||
// set the initial state
|
||||
try {
|
||||
ioService.offline = this._prefs.getBoolPref("browser.offline");
|
||||
}
|
||||
catch (e) {
|
||||
ioService.offline = false;
|
||||
}
|
||||
}
|
||||
|
||||
this._observerService.notifyObservers(null, "browser-ui-startup-complete", "");
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user