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

Unified Diff: extensions/browser/api/web_request/upload_data_presenter.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 | « extensions/browser/api/serial/serial_apitest.cc ('k') | extensions/browser/extension_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/web_request/upload_data_presenter.cc
diff --git a/extensions/browser/api/web_request/upload_data_presenter.cc b/extensions/browser/api/web_request/upload_data_presenter.cc
index e9584c32787e32f784083101cce8fb3fbe833b1f..dbc6c9147432e21fa68b557e1ec214c7f3846c19 100644
--- a/extensions/browser/api/web_request/upload_data_presenter.cc
+++ b/extensions/browser/api/web_request/upload_data_presenter.cc
@@ -46,9 +46,9 @@ namespace subtle {
void AppendKeyValuePair(const char* key,
base::Value* value,
base::ListValue* list) {
- base::DictionaryValue* dictionary = new base::DictionaryValue;
+ std::unique_ptr<base::DictionaryValue> dictionary(new base::DictionaryValue);
dictionary->SetWithoutPathExpansion(key, value);
- list->Append(dictionary);
+ list->Append(std::move(dictionary));
}
} // namespace subtle
« no previous file with comments | « extensions/browser/api/serial/serial_apitest.cc ('k') | extensions/browser/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698