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

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

Issue 21030009: Make element removal methods in DictionaryValue and ListValue take scoped_ptr's as outparams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 7 years, 4 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/plugins/plugin_finder_unittest.cc ('k') | chrome/browser/policy/config_dir_policy_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/cloud/component_cloud_policy_store.cc
diff --git a/chrome/browser/policy/cloud/component_cloud_policy_store.cc b/chrome/browser/policy/cloud/component_cloud_policy_store.cc
index 20bf9555b51de1095d9e5ef65b306fa333c841f9..3a9c5d63d65b0da01ee57022660b00f39767db86 100644
--- a/chrome/browser/policy/cloud/component_cloud_policy_store.cc
+++ b/chrome/browser/policy/cloud/component_cloud_policy_store.cc
@@ -322,7 +322,7 @@ bool ComponentCloudPolicyStore::ParsePolicy(const std::string& data,
if (!dict->GetDictionaryWithoutPathExpansion(it.key(), &description))
return false;
- base::Value* value = NULL;
+ scoped_ptr<base::Value> value;
if (!description->RemoveWithoutPathExpansion(kValue, &value))
return false;
@@ -336,7 +336,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.key(), level, POLICY_SCOPE_USER, value, NULL);
+ policy->Set(it.key(), level, POLICY_SCOPE_USER, value.release(), NULL);
}
return true;
« no previous file with comments | « chrome/browser/plugins/plugin_finder_unittest.cc ('k') | chrome/browser/policy/config_dir_policy_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698