Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(800)

Unified Diff: net/url_request/url_request_throttler_manager.cc

Issue 9147026: API for connection type (Ethernet/WIFI/WWAN ...) in NetworkChangeNotifier. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request_throttler_manager.cc
diff --git a/net/url_request/url_request_throttler_manager.cc b/net/url_request/url_request_throttler_manager.cc
index 8e634e8ff2d2b0ebc8fe7ad5a8a579e5821285bb..c9f98deacde84a561f697eec38f84966116907c3 100644
--- a/net/url_request/url_request_throttler_manager.cc
+++ b/net/url_request/url_request_throttler_manager.cc
@@ -30,7 +30,7 @@ scoped_refptr<URLRequestThrottlerEntryInterface>
// registered.
// TODO(joi): Clean this up once this is no longer a Singleton.
NetworkChangeNotifier::AddIPAddressObserver(this);
- NetworkChangeNotifier::AddOnlineStateObserver(this);
+ NetworkChangeNotifier::AddConnectionStateObserver(this);
registered_from_thread_ = base::PlatformThread::CurrentId();
}
@@ -146,7 +146,8 @@ void URLRequestThrottlerManager::OnIPAddressChanged() {
OnNetworkChange();
}
-void URLRequestThrottlerManager::OnOnlineStateChanged(bool online) {
+void URLRequestThrottlerManager::OnConnectionStateChanged(
+ NetworkChangeNotifier::ConnectionState state) {
OnNetworkChange();
}
@@ -183,7 +184,7 @@ URLRequestThrottlerManager::~URLRequestThrottlerManager() {
// TODO(joi): Fix once we are no longer a Singleton.
if (base::PlatformThread::CurrentId() == registered_from_thread_) {
NetworkChangeNotifier::RemoveIPAddressObserver(this);
- NetworkChangeNotifier::RemoveOnlineStateObserver(this);
+ NetworkChangeNotifier::RemoveConnectionStateObserver(this);
}
// Since, for now, the manager object might conceivably go away before
« net/base/network_change_notifier_mac.cc ('K') | « net/url_request/url_request_throttler_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698