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

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

Issue 22885002: c/b/extensions, json_schema_compiler: Do not use Value::Create*. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Trying one last time get past Base Files Missing. 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
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 9f7dc634237bc76f8d5fcb71ab9fbdf15b30500c..f3174165addd7093df021c382c1ae2515226efd0 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
@@ -1043,7 +1043,7 @@ void DownloadsDownloadFunction::OnStarted(
VLOG(1) << __FUNCTION__ << " " << item << " " << error;
if (item) {
DCHECK_EQ(net::OK, error);
- SetResult(base::Value::CreateIntegerValue(item->GetId()));
+ SetResult(new base::FundamentalValue((int)item->GetId()));
if (!creator_suggested_filename.empty()) {
ExtensionDownloadsEventRouterData* data =
ExtensionDownloadsEventRouterData::Get(item);
@@ -1187,7 +1187,7 @@ bool DownloadsEraseFunction::RunImpl() {
base::ListValue* json_results = new base::ListValue();
for (DownloadManager::DownloadVector::const_iterator it = results.begin();
it != results.end(); ++it) {
- json_results->Append(base::Value::CreateIntegerValue((*it)->GetId()));
+ json_results->Append(new base::FundamentalValue((int)(*it)->GetId()));
(*it)->Remove();
}
SetResult(json_results);
@@ -1479,7 +1479,7 @@ void DownloadsGetFileIconFunction::OnIconURLExtracted(const std::string& url) {
return;
}
RecordApiFunctions(DOWNLOADS_FUNCTION_GET_FILE_ICON);
- SetResult(base::Value::CreateStringValue(url));
+ SetResult(new base::StringValue(url));
SendResponse(true);
}
@@ -1819,7 +1819,7 @@ void ExtensionDownloadsEventRouter::OnDownloadRemoved(
DispatchEvent(events::kOnDownloadErased,
true,
extensions::Event::WillDispatchCallback(),
- base::Value::CreateIntegerValue(download_item->GetId()));
+ new base::FundamentalValue((int)download_item->GetId()));
}
void ExtensionDownloadsEventRouter::DispatchEvent(

Powered by Google App Engine
This is Rietveld 408576698