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

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: Tiny fix for get_server_time 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 9760f02e0e7bf61af796aba0e021b214118b21ab..44ceb0cebc04ef2dc433150407b95bb448ea54ab 100644
--- a/chrome/browser/net/pref_proxy_config_tracker_impl.cc
+++ b/chrome/browser/net/pref_proxy_config_tracker_impl.cc
@@ -69,6 +69,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) {
@@ -108,8 +113,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