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

Unified Diff: chrome/browser/ui/webui/downloads_dom_handler.cc

Issue 16924017: A few minor changes to the chrome.downloads extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: @r212092 Created 7 years, 5 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/ui/webui/downloads_dom_handler.cc
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index 124b278084b02757b18d296904bb554ce45957ae..c57f89e41f1587ff4ae6ce9aa5d5276dd69c487f 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -514,14 +514,16 @@ void DownloadsDOMHandler::ShowDangerPrompt(
dangerous_item,
GetWebUIWebContents(),
false,
- base::Bind(&DownloadsDOMHandler::DangerPromptAccepted,
- weak_ptr_factory_.GetWeakPtr(), dangerous_item->GetId()),
- base::Closure());
+ base::Bind(&DownloadsDOMHandler::DangerPromptDone,
+ weak_ptr_factory_.GetWeakPtr(), dangerous_item->GetId()));
// danger_prompt will delete itself.
DCHECK(danger_prompt);
}
-void DownloadsDOMHandler::DangerPromptAccepted(int download_id) {
+void DownloadsDOMHandler::DangerPromptDone(
+ int download_id, DownloadDangerPrompt::Action action) {
+ if (action != DownloadDangerPrompt::ACCEPT)
+ return;
content::DownloadItem* item = NULL;
if (main_notifier_.GetManager())
item = main_notifier_.GetManager()->GetDownload(download_id);

Powered by Google App Engine
This is Rietveld 408576698