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

Unified Diff: chrome/browser/net/pref_proxy_config_tracker_impl.cc

Issue 10912132: Move ProxyConfigService construction onto the IO thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra blank line Created 8 years, 2 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: chrome/browser/net/pref_proxy_config_tracker_impl.cc
diff --git a/chrome/browser/net/pref_proxy_config_tracker_impl.cc b/chrome/browser/net/pref_proxy_config_tracker_impl.cc
index 6b4c30f35a42b13a52b695ae886cc6d716cbd3b2..b9213f2bc156b65fd693a38d370c9796154900bf 100644
--- a/chrome/browser/net/pref_proxy_config_tracker_impl.cc
+++ b/chrome/browser/net/pref_proxy_config_tracker_impl.cc
@@ -70,6 +70,11 @@ void ChromeProxyConfigService::OnLazyPoll() {
base_service_->OnLazyPoll();
}
+void ChromeProxyConfigService::StartTearDown() {
+ if (base_service_.get())
+ base_service_->StartTearDown();
+}
+
void ChromeProxyConfigService::UpdateProxyConfig(
ProxyPrefs::ConfigState config_state,
const net::ProxyConfig& config) {
@@ -109,8 +114,10 @@ void ChromeProxyConfigService::OnProxyConfigChanged(
if (!PrefProxyConfigTrackerImpl::PrefPrecedes(pref_config_state_)) {
net::ProxyConfig actual_config;
availability = GetLatestProxyConfig(&actual_config);
- FOR_EACH_OBSERVER(net::ProxyConfigService::Observer, observers_,
- OnProxyConfigChanged(actual_config, availability));
+ // Don't send out notification if we don't really have a configuration yet.
+ if (availability != net::ProxyConfigService::CONFIG_PENDING)
+ FOR_EACH_OBSERVER(net::ProxyConfigService::Observer, observers_,
+ OnProxyConfigChanged(actual_config, availability));
}
}

Powered by Google App Engine
This is Rietveld 408576698