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

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

Issue 2017113002: [Extensions] DCHECK that ExtensionFunctions respond (and only once) (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..bbbb6519af6b379959638ad39cede31bcb567e27 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
@@ -1271,7 +1271,7 @@ void DownloadsAcceptDangerFunction::PromptOrWait(int download_id, int retries) {
return;
}
error_ = errors::kInvisibleContext;
- SendResponse(error_.empty());
+ SendResponse(false);
return;
}
RecordApiFunctions(DOWNLOADS_FUNCTION_ACCEPT_DANGER);
@@ -1286,7 +1286,7 @@ void DownloadsAcceptDangerFunction::PromptOrWait(int download_id, int retries) {
// DownloadDangerPrompt deletes itself
if (on_prompt_created_ && !on_prompt_created_->is_null())
on_prompt_created_->Run(prompt);
- SendResponse(error_.empty());
+ // Function finishes in DangerPromptCallback().
}
void DownloadsAcceptDangerFunction::DangerPromptCallback(

Powered by Google App Engine
This is Rietveld 408576698