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

Unified Diff: chrome/browser/policy/config_dir_policy_loader.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/policy/cloud/component_cloud_policy_store.cc ('k') | chrome/browser/ui/webui/about_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/config_dir_policy_loader.cc
diff --git a/chrome/browser/policy/config_dir_policy_loader.cc b/chrome/browser/policy/config_dir_policy_loader.cc
index 56b079dd2548d2ffa58cac9244ff3f962a676875..7ba2b322017df6701faa22703d7b94c0572bdc45 100644
--- a/chrome/browser/policy/config_dir_policy_loader.cc
+++ b/chrome/browser/policy/config_dir_policy_loader.cc
@@ -159,11 +159,9 @@ void ConfigDirPolicyLoader::LoadFromPath(const base::FilePath& path,
}
// Detach the "3rdparty" node.
- base::Value* third_party = NULL;
- if (dictionary_value->Remove("3rdparty", &third_party)) {
- Merge3rdPartyPolicy(third_party, level, bundle);
- delete third_party;
- }
+ scoped_ptr<base::Value> third_party;
+ if (dictionary_value->Remove("3rdparty", &third_party))
+ Merge3rdPartyPolicy(third_party.get(), level, bundle);
// Add chrome policy.
PolicyMap policy_map;
« no previous file with comments | « chrome/browser/policy/cloud/component_cloud_policy_store.cc ('k') | chrome/browser/ui/webui/about_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698