Backed out changeset 82d6b5523a2b (bug 1134596)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 09 Apr 2015 12:31:51 +0200
changeset 268160 5c1530d4b38cf911491deab62a4ba6ba8e5a18e6
parent 268159 09e982a5d59166a1c3ff123a9c7d1122abe2dcca
child 268161 450f08cb8777a873fea94c3c8fdb1fecc80baa83
push id4830
push userjlund@mozilla.com
push dateMon, 29 Jun 2015 20:18:48 +0000
treeherdermozilla-beta@4c2175bb0420 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1134596
milestone40.0a1
backs out82d6b5523a2bac42d66d517686c57ec3c776a558
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 82d6b5523a2b (bug 1134596)
modules/libpref/init/all.js
netwerk/base/nsIOService.cpp
netwerk/base/nsIOService.h
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1157,21 +1157,16 @@ pref("network.protocol-handler.external.
 pref("network.protocol-handler.expose-all", true);
 
 // Warning for about:networking page
 pref("network.warnOnAboutNetworking", true);
 
 // Example: make IMAP an exposed protocol
 // pref("network.protocol-handler.expose.imap", true);
 
-// Whether IOService.connectivity and NS_IsOffline depends on connectivity status
-pref("network.manage-offline-status", false);
-// If set to true, IOService.offline depends on IOService.connectivity
-pref("network.offline-mirrors-connectivity", true);
-
 // <http>
 pref("network.http.version", "1.1");      // default
 // pref("network.http.version", "1.0");   // uncomment this out in case of problems
 // pref("network.http.version", "0.9");   // it'll work too if you're crazy
 // keep-alive option is effectively obsolete. Nevertheless it'll work with
 // some older 1.0 servers:
 
 pref("network.http.proxy.version", "1.1");    // default
--- a/netwerk/base/nsIOService.cpp
+++ b/netwerk/base/nsIOService.cpp
@@ -54,17 +54,16 @@
 
 using namespace mozilla;
 using mozilla::net::IsNeckoChild;
 
 #define PORT_PREF_PREFIX           "network.security.ports."
 #define PORT_PREF(x)               PORT_PREF_PREFIX x
 #define AUTODIAL_PREF              "network.autodial-helper.enabled"
 #define MANAGE_OFFLINE_STATUS_PREF "network.manage-offline-status"
-#define OFFLINE_MIRRORS_CONNECTIVITY "network.offline-mirrors-connectivity"
 
 // Nb: these have been misnomers since bug 715770 removed the buffer cache.
 // "network.segment.count" and "network.segment.size" would be better names,
 // but the old names are still used to preserve backward compatibility.
 #define NECKO_BUFFER_CACHE_COUNT_PREF "network.buffer.cache.count"
 #define NECKO_BUFFER_CACHE_SIZE_PREF  "network.buffer.cache.size"
 #define NETWORK_NOTIFY_CHANGED_PREF   "network.notify.changed"
 
@@ -156,17 +155,16 @@ NS_IMPL_ISUPPORTS(nsAppOfflineInfo, nsIA
 
 ////////////////////////////////////////////////////////////////////////////////
 
 nsIOService::nsIOService()
     : mOffline(true)
     , mOfflineForProfileChange(false)
     , mManageLinkStatus(false)
     , mConnectivity(true)
-    , mOfflineMirrorsConnectivity(true)
     , mSettingOffline(false)
     , mSetOfflineValue(false)
     , mShutdown(false)
     , mNetworkLinkServiceInitialized(false)
     , mChannelEventSinks(NS_CHANNEL_EVENT_SINK_CATEGORY)
     , mAutoDialEnabled(false)
     , mNetworkNotifyChanged(true)
     , mPreviousWifiState(-1)
@@ -224,17 +222,16 @@ nsIOService::Init()
         observerService->AddObserver(this, NS_NETWORK_LINK_TOPIC, true);
         observerService->AddObserver(this, NS_WIDGET_WAKE_OBSERVER_TOPIC, true);
         observerService->AddObserver(this, kNetworkActiveChanged, true);
     }
     else
         NS_WARNING("failed to get observer service");
 
     Preferences::AddBoolVarCache(&sTelemetryEnabled, "toolkit.telemetry.enabled", false);
-    Preferences::AddBoolVarCache(&mOfflineMirrorsConnectivity, OFFLINE_MIRRORS_CONNECTIVITY, true);
 
     gIOService = this;
 
     InitializeNetworkLinkService();
 
     return NS_OK;
 }
 
@@ -837,21 +834,17 @@ nsIOService::IsLinkUp()
     }
 
     return isLinkUp;
 }
 
 NS_IMETHODIMP
 nsIOService::GetOffline(bool *offline)
 {
-    if (mOfflineMirrorsConnectivity) {
-        *offline = mOffline || !mConnectivity;
-    } else {
-        *offline = mOffline;
-    }
+    *offline = mOffline;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsIOService::SetOffline(bool offline)
 {
     // When someone wants to go online (!offline) after we got XPCOM shutdown
     // throw ERROR_NOT_AVAILABLE to prevent return to online state.
--- a/netwerk/base/nsIOService.h
+++ b/netwerk/base/nsIOService.h
@@ -122,19 +122,16 @@ private:
                                                      uint32_t aProxyFlags,
                                                      nsILoadInfo* aLoadInfo,
                                                      nsIChannel** result);
 private:
     bool                                 mOffline;
     bool                                 mOfflineForProfileChange;
     bool                                 mManageLinkStatus;
     bool                                 mConnectivity;
-    // If true, the connectivity state will be mirrored by IOService.offline
-    // meaning if !mConnectivity, GetOffline() will return true
-    bool                                 mOfflineMirrorsConnectivity;
 
     // Used to handle SetOffline() reentrancy.  See the comment in
     // SetOffline() for more details.
     bool                                 mSettingOffline;
     bool                                 mSetOfflineValue;
 
     bool                                 mShutdown;