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

Unified Diff: chrome/browser/ui/webui/cookies_tree_model_util.cc

Issue 2058233002: Rewrite simple uses of base::ListValue::Append() taking a raw pointer var. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: less comments more ownership Created 4 years, 6 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/ui/webui/components_ui.cc ('k') | chrome/browser/ui/webui/flash_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/cookies_tree_model_util.cc
diff --git a/chrome/browser/ui/webui/cookies_tree_model_util.cc b/chrome/browser/ui/webui/cookies_tree_model_util.cc
index d5311963735db722aaf403ba706f2a002def79fa..a1cef917ef870316d7414cfebe3c3f343cf7d843 100644
--- a/chrome/browser/ui/webui/cookies_tree_model_util.cc
+++ b/chrome/browser/ui/webui/cookies_tree_model_util.cc
@@ -309,10 +309,11 @@ bool CookiesTreeModelUtil::GetCookieTreeNodeDictionary(
base::ListValue* app_infos = new base::ListValue;
for (extensions::ExtensionSet::const_iterator it = protecting_apps->begin();
it != protecting_apps->end(); ++it) {
- base::DictionaryValue* app_info = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> app_info(
+ new base::DictionaryValue());
app_info->SetString(kKeyId, (*it)->id());
app_info->SetString(kKeyName, (*it)->name());
- app_infos->Append(app_info);
+ app_infos->Append(std::move(app_info));
}
dict->Set(kKeyAppsProtectingThis, app_infos);
}
« no previous file with comments | « chrome/browser/ui/webui/components_ui.cc ('k') | chrome/browser/ui/webui/flash_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698