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

Unified Diff: net/proxy/proxy_service.cc

Issue 11620007: Switch from OnIPAddressChanged and OnConnectionTypeChange to OnNetworkChanged Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/proxy/proxy_service.cc
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index 17e46ed1d318e18e52c09c86155b9b1b10bca628..17d3b2edba15ef65b2e454e84d495165147c3fe0 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -869,7 +869,7 @@ ProxyService::ProxyService(ProxyConfigService* config_service,
net_log_(net_log),
stall_proxy_auto_config_delay_(TimeDelta::FromMilliseconds(
kDelayAfterNetworkChangesMs)) {
- NetworkChangeNotifier::AddIPAddressObserver(this);
+ NetworkChangeNotifier::AddNetworkChangeObserver(this);
NetworkChangeNotifier::AddDNSObserver(this);
ResetConfigService(config_service);
}
@@ -1025,7 +1025,7 @@ int ProxyService::TryToCompleteSynchronously(const GURL& url,
}
ProxyService::~ProxyService() {
- NetworkChangeNotifier::RemoveIPAddressObserver(this);
+ NetworkChangeNotifier::RemoveNetworkChangeObserver(this);
NetworkChangeNotifier::RemoveDNSObserver(this);
config_service_->RemoveObserver(this);
@@ -1482,7 +1482,10 @@ void ProxyService::InitializeUsingDecidedConfig(
OnInitProxyResolverComplete(rv);
}
-void ProxyService::OnIPAddressChanged() {
+void ProxyService::OnNetworkChanged(
+ net::NetworkChangeNotifier::ConnectionType type) {
+ if (type != net::NetworkChangeNotifier::CONNECTION_NONE)
szym 2013/01/20 06:52:08 Same concern as before in AddressTrackerPosix.
+ return;
// See the comment block by |kDelayAfterNetworkChangesMs| for info.
stall_proxy_autoconfig_until_ =
TimeTicks::Now() + stall_proxy_auto_config_delay_;
@@ -1493,7 +1496,7 @@ void ProxyService::OnIPAddressChanged() {
}
void ProxyService::OnDNSChanged() {
- OnIPAddressChanged();
+ OnNetworkChanged(net::NetworkChangeNotifier::CONNECTION_NONE);
}
SyncProxyServiceHelper::SyncProxyServiceHelper(MessageLoop* io_message_loop,

Powered by Google App Engine
This is Rietveld 408576698