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

Unified Diff: chromeos/network/proxy/proxy_config_service_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 | « no previous file | components/proxy_config/pref_proxy_config_tracker_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/proxy/proxy_config_service_impl.cc
diff --git a/chromeos/network/proxy/proxy_config_service_impl.cc b/chromeos/network/proxy/proxy_config_service_impl.cc
index d59ecd9c04500d7b8cff75f8eb6ac51ae822d680..d173087e06e529210f5d4199050ebf1b16b5f71d 100644
--- a/chromeos/network/proxy/proxy_config_service_impl.cc
+++ b/chromeos/network/proxy/proxy_config_service_impl.cc
@@ -256,15 +256,10 @@ void ProxyConfigServiceImpl::DetermineEffectiveConfigFromDefaultNetwork() {
network_config, ignore_proxy, &effective_config_state,
&effective_config);
- // Activate effective proxy and store into |active_config_|.
- // If last update didn't complete, we definitely update now.
- bool update_now = update_pending();
- if (!update_now) { // Otherwise, only update now if there're changes.
- update_now = active_config_state_ != effective_config_state ||
- (active_config_state_ != ProxyPrefs::CONFIG_UNSET &&
- !active_config_.Equals(effective_config));
- }
- if (update_now) { // Activate and store new effective config.
+ bool config_changed = active_config_state_ != effective_config_state ||
+ (active_config_state_ != ProxyPrefs::CONFIG_UNSET &&
+ !active_config_.Equals(effective_config));
+ if (config_changed) { // Activate and store new effective config.
active_config_state_ = effective_config_state;
if (active_config_state_ != ProxyPrefs::CONFIG_UNSET)
active_config_ = effective_config;
@@ -281,7 +276,7 @@ void ProxyConfigServiceImpl::DetermineEffectiveConfigFromDefaultNetwork() {
}
PrefProxyConfigTrackerImpl::OnProxyConfigChanged(effective_config_state,
effective_config);
- if (VLOG_IS_ON(1) && !update_pending()) { // Update was successful.
+ if (VLOG_IS_ON(1)) {
std::unique_ptr<base::DictionaryValue> config_dict(
effective_config.ToValue());
VLOG(1) << this << ": Proxy changed: "
« no previous file with comments | « no previous file | components/proxy_config/pref_proxy_config_tracker_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698