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

Unified Diff: chrome/browser/extensions/api/downloads/downloads_api.cc

Issue 2051663003: base::ListValue::Append cleanup: pass unique_ptr instead of the released pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
Index: chrome/browser/extensions/api/downloads/downloads_api.cc
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc
index 229d55e30c4157abc34d1dbd05a7d6f3488226b7..c256e11d5bbfddafcbfa696ec880ccd9ebe69d11 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
@@ -1103,7 +1103,7 @@ bool DownloadsSearchFunction::RunSync() {
std::unique_ptr<base::DictionaryValue> json_item(DownloadItemToJSON(
*it, off_record ? GetProfile()->GetOffTheRecordProfile()
: GetProfile()->GetOriginalProfile()));
- json_results->Append(json_item.release());
+ json_results->Append(std::move(json_item));
}
SetResult(std::move(json_results));
RecordApiFunctions(DOWNLOADS_FUNCTION_SEARCH);

Powered by Google App Engine
This is Rietveld 408576698