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

Unified Diff: chrome/browser/policy/configuration_policy_provider.cc

Issue 9911029: Refactored the CloudPolicyProvider so that it becomes initialized once and stays initialized. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated expectations in failing browser_tests Created 8 years, 9 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/policy/configuration_policy_provider.cc
diff --git a/chrome/browser/policy/configuration_policy_provider.cc b/chrome/browser/policy/configuration_policy_provider.cc
index 6859c4b7756a3bd0c7f533d418c8494833fc2797..84ba1f6b3dc2cffa126f52dea02a880090c1870f 100644
--- a/chrome/browser/policy/configuration_policy_provider.cc
+++ b/chrome/browser/policy/configuration_policy_provider.cc
@@ -97,7 +97,11 @@ void ConfigurationPolicyProvider::FixDeprecatedPolicies(PolicyMap* policies) {
policies->Erase(kProxyPolicies[i]);
}
}
- if (!proxy_settings->empty() && !policies->Get(key::kProxySettings)) {
+ // Sets the new |proxy_settings| if kProxySettings isn't set yet, or if the
+ // new priority is higher.
+ const PolicyMap::Entry* existing = policies->Get(key::kProxySettings);
+ if (!proxy_settings->empty() &&
+ (!existing || current_priority.has_higher_priority_than(*existing))) {
Mattias Nissler (ping if slow) 2012/03/30 08:48:46 good catch.
policies->Set(key::kProxySettings,
current_priority.level,
current_priority.scope,

Powered by Google App Engine
This is Rietveld 408576698