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

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

Issue 2030013003: Remove ListValue::Append(new {Fundamental,String}Value(...)) pattern in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 5c10000284ab67b7a89e65b18a752bbd322ec1aa..8e810c0f13c12f85c766d8d045c6ea9c29a9843a 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
@@ -1193,8 +1193,7 @@ bool DownloadsEraseFunction::RunSync() {
std::unique_ptr<base::ListValue> json_results(new base::ListValue());
for (DownloadManager::DownloadVector::const_iterator it = results.begin();
it != results.end(); ++it) {
- json_results->Append(
- new base::FundamentalValue(static_cast<int>((*it)->GetId())));
+ json_results->AppendInteger(static_cast<int>((*it)->GetId()));
(*it)->Remove();
}
SetResult(std::move(json_results));

Powered by Google App Engine
This is Rietveld 408576698