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

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: @r214130 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
« no previous file with comments | « chrome/browser/ui/webui/downloads_dom_handler.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 72245e1d558de5a35ad28e25569f0ef465efbe7d..d31964be239462f6c9f4e201bb8c628de7e01a91 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -518,14 +518,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);
« no previous file with comments | « chrome/browser/ui/webui/downloads_dom_handler.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698