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

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

Issue 12601006: Removing base::DictionaryValue::key_iterator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial patch. Created 7 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 | « chrome/browser/net/transport_security_persister.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/component_cloud_policy_store.cc
diff --git a/chrome/browser/policy/component_cloud_policy_store.cc b/chrome/browser/policy/component_cloud_policy_store.cc
index e02783214dc5f5003667b624bb0e9f19b0bdb4d2..98637a6ea37f6f1823fa55c5946b9fa272962712 100644
--- a/chrome/browser/policy/component_cloud_policy_store.cc
+++ b/chrome/browser/policy/component_cloud_policy_store.cc
@@ -315,19 +315,18 @@ bool ComponentCloudPolicyStore::ParsePolicy(const std::string& data,
// Each description is an object that contains the policy value under the
// "Value" key. The optional "Level" key is either "Mandatory" (default) or
// "Recommended".
- for (base::DictionaryValue::key_iterator it = dict->begin_keys();
- it != dict->end_keys(); ++it) {
+ for (base::DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) {
base::DictionaryValue* description = NULL;
- if (!dict->GetDictionary(*it, &description))
+ if (!dict->GetDictionaryWithoutPathExpansion(it.key(), &description))
return false;
base::Value* value = NULL;
- if (!description->Remove(kValue, &value))
+ if (!description->RemoveWithoutPathExpansion(kValue, &value))
return false;
PolicyLevel level = POLICY_LEVEL_MANDATORY;
std::string level_string;
- if (description->GetString(kLevel, &level_string) &&
+ if (description->GetStringWithoutPathExpansion(kLevel, &level_string) &&
level_string == kRecommended) {
level = POLICY_LEVEL_RECOMMENDED;
}
@@ -335,7 +334,7 @@ bool ComponentCloudPolicyStore::ParsePolicy(const std::string& data,
// If policy for components is ever used for device-level settings then
// this must support a configurable scope; assuming POLICY_SCOPE_USER is
// fine for now.
- policy->Set(*it, level, POLICY_SCOPE_USER, value);
+ policy->Set(it.key(), level, POLICY_SCOPE_USER, value);
}
return true;
« no previous file with comments | « chrome/browser/net/transport_security_persister.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698