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

Unified Diff: components/proxy_config/pref_proxy_config_tracker_impl.cc

Issue 2950573002: Fix chromeos::ProxyConfigServiceImpl not setting ProxyConfig on start. (Closed)
Patch Set: Oops Created 3 years, 6 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
« no previous file with comments | « components/proxy_config/pref_proxy_config_tracker_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/proxy_config/pref_proxy_config_tracker_impl.cc
diff --git a/components/proxy_config/pref_proxy_config_tracker_impl.cc b/components/proxy_config/pref_proxy_config_tracker_impl.cc
index 0fead147cefb8c5e3bfd17f77cdc9a1eaf801dc8..ab770b2ddab0329bac1acb1d6c147486c237d77b 100644
--- a/components/proxy_config/pref_proxy_config_tracker_impl.cc
+++ b/components/proxy_config/pref_proxy_config_tracker_impl.cc
@@ -131,7 +131,6 @@ PrefProxyConfigTrackerImpl::PrefProxyConfigTrackerImpl(
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner)
: pref_service_(pref_service),
proxy_config_service_impl_(NULL),
- update_pending_(true),
io_task_runner_(io_task_runner) {
config_state_ = ReadPrefConfig(pref_service_, &pref_config_);
proxy_prefs_.Init(pref_service);
@@ -152,7 +151,6 @@ PrefProxyConfigTrackerImpl::CreateTrackingProxyConfigService(
std::move(base_service), config_state_, pref_config_);
VLOG(1) << this << ": set chrome proxy config service to "
<< proxy_config_service_impl_;
- update_pending_ = false;
return std::unique_ptr<net::ProxyConfigService>(proxy_config_service_impl_);
}
@@ -267,17 +265,12 @@ ProxyPrefs::ConfigState PrefProxyConfigTrackerImpl::GetProxyConfig(
void PrefProxyConfigTrackerImpl::OnProxyConfigChanged(
ProxyPrefs::ConfigState config_state,
const net::ProxyConfig& config) {
- if (!proxy_config_service_impl_) {
- VLOG(1) << "No chrome proxy config service to push to UpdateProxyConfig";
- update_pending_ = true;
+ if (!proxy_config_service_impl_)
return;
- }
- update_pending_ = !io_task_runner_->PostTask(
+ io_task_runner_->PostTask(
FROM_HERE, base::Bind(&ProxyConfigServiceImpl::UpdateProxyConfig,
base::Unretained(proxy_config_service_impl_),
config_state, config));
- VLOG(1) << this << (update_pending_ ? ": Error" : ": Done")
- << " pushing proxy to UpdateProxyConfig";
}
bool PrefProxyConfigTrackerImpl::PrefConfigToNetConfig(
@@ -352,8 +345,6 @@ void PrefProxyConfigTrackerImpl::OnProxyPrefChanged() {
config_state_ = config_state;
if (config_state_ != ProxyPrefs::CONFIG_UNSET)
pref_config_ = new_config;
- update_pending_ = true;
- }
- if (update_pending_)
OnProxyConfigChanged(config_state, new_config);
+ }
}
« no previous file with comments | « components/proxy_config/pref_proxy_config_tracker_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698