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

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: Review comments Created 8 years, 7 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 c2fa4300b6cb2de9c1d6ec2c4947aaeac0b476d8..5c505587a465bfab5515cb9dc2c2c5d7f63e2092 100644
--- a/net/url_request/url_request_throttler_manager.cc
+++ b/net/url_request/url_request_throttler_manager.cc
@@ -28,12 +28,12 @@ URLRequestThrottlerManager::URLRequestThrottlerManager()
url_id_replacements_.ClearRef();
NetworkChangeNotifier::AddIPAddressObserver(this);
- NetworkChangeNotifier::AddOnlineStateObserver(this);
+ NetworkChangeNotifier::AddConnectionTypeObserver(this);
}
URLRequestThrottlerManager::~URLRequestThrottlerManager() {
NetworkChangeNotifier::RemoveIPAddressObserver(this);
- NetworkChangeNotifier::RemoveOnlineStateObserver(this);
+ NetworkChangeNotifier::RemoveConnectionTypeObserver(this);
// Since, for now, the manager object might conceivably go away before
// the entries, detach the entries' back-pointer to the manager.
@@ -166,7 +166,8 @@ void URLRequestThrottlerManager::OnIPAddressChanged() {
OnNetworkChange();
}
-void URLRequestThrottlerManager::OnOnlineStateChanged(bool online) {
+void URLRequestThrottlerManager::OnConnectionTypeChanged(
+ NetworkChangeNotifier::ConnectionType type) {
OnNetworkChange();
}
@@ -207,7 +208,7 @@ void URLRequestThrottlerManager::OnNetworkChange() {
// Remove all entries. Any entries that in-flight requests have a reference
// to will live until those requests end, and these entries may be
// inconsistent with new entries for the same URLs, but since what we
- // want is a clean slate for the new connection state, this is OK.
+ // want is a clean slate for the new connection type, this is OK.
url_entries_.clear();
requests_since_last_gc_ = 0;
}

Powered by Google App Engine
This is Rietveld 408576698