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

Unified Diff: components/policy/core/common/policy_test_utils.cc

Issue 1825173003: [Policy Experimental] Add "recommended" policies for URL exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. Created 4 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
« no previous file with comments | « components/policy/core/common/policy_map.cc ('k') | components/policy/core/common/policy_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/policy_test_utils.cc
diff --git a/components/policy/core/common/policy_test_utils.cc b/components/policy/core/common/policy_test_utils.cc
index 9d1a50dae2eb9367455743442c29afc1f88e4643..e6dc3eeb0a53b6ee4f0dc9a6c7e590126503fe4c 100644
--- a/components/policy/core/common/policy_test_utils.cc
+++ b/components/policy/core/common/policy_test_utils.cc
@@ -47,8 +47,11 @@ bool PolicyServiceIsEmpty(const PolicyService* service) {
PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()));
if (!map.empty()) {
base::DictionaryValue dict;
- for (PolicyMap::const_iterator it = map.begin(); it != map.end(); ++it)
- dict.SetWithoutPathExpansion(it->first, it->second.value->DeepCopy());
+ for (PolicyMap::const_iterator it = map.begin(); it != map.end();
+ map.next_dominant(&it)) {
+ dict.SetWithoutPathExpansion(it->first.name,
+ it->second.value->DeepCopy());
+ }
LOG(WARNING) << "There are pre-existing policies in this machine: " << dict;
}
return map.empty();
« no previous file with comments | « components/policy/core/common/policy_map.cc ('k') | components/policy/core/common/policy_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698