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

Unified Diff: chrome/browser/download/download_shelf_context_menu.cc

Issue 10421021: Make DownloadProtectionService not use BrowserList::GetLastActive() to load a link. Instead pass th… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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/download/download_shelf_context_menu.cc
===================================================================
--- chrome/browser/download/download_shelf_context_menu.cc (revision 138377)
+++ chrome/browser/download/download_shelf_context_menu.cc (working copy)
@@ -14,6 +14,7 @@
#include "chrome/common/extensions/extension_switch_utils.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
+#include "content/public/browser/page_navigator.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -23,9 +24,11 @@
DownloadShelfContextMenu::~DownloadShelfContextMenu() {}
DownloadShelfContextMenu::DownloadShelfContextMenu(
- BaseDownloadItemModel* download_model)
+ BaseDownloadItemModel* download_model,
+ content::PageNavigator* navigator)
: download_model_(download_model),
- download_item_(download_model->download()) {
+ download_item_(download_model->download()),
+ navigator_(navigator) {
}
ui::SimpleMenuModel* DownloadShelfContextMenu::GetMenuModel() {
@@ -125,7 +128,8 @@
if (protection_service) {
protection_service->ShowDetailsForDownload(
DownloadProtectionService::DownloadInfo::FromDownloadItem(
- *download_item_));
+ *download_item_),
+ navigator_);
}
#else
// Should only be getting invoked if we are using safe browsing.
« no previous file with comments | « chrome/browser/download/download_shelf_context_menu.h ('k') | chrome/browser/safe_browsing/download_protection_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698