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

Unified Diff: chrome/browser/ui/views/download/download_shelf_context_menu_view.cc

Issue 2439533002: Download Feedback Service should upload all eligible downloads (Closed)
Patch Set: nit function renaming Created 4 years, 2 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/views/download/download_shelf_context_menu_view.cc
diff --git a/chrome/browser/ui/views/download/download_shelf_context_menu_view.cc b/chrome/browser/ui/views/download/download_shelf_context_menu_view.cc
index 20ab817fe3626c08574537e199a3ed4906434bab..0bfbd101b712c8377245dc23f75ea50d1ad21d9d 100644
--- a/chrome/browser/ui/views/download/download_shelf_context_menu_view.cc
+++ b/chrome/browser/ui/views/download/download_shelf_context_menu_view.cc
@@ -13,9 +13,9 @@
#include "ui/views/controls/menu/menu_runner.h"
DownloadShelfContextMenuView::DownloadShelfContextMenuView(
- content::DownloadItem* download_item)
- : DownloadShelfContextMenu(download_item) {
-}
+ DownloadItemView* download_item_view)
+ : DownloadShelfContextMenu(download_item_view->download()),
+ download_item_view_(download_item_view) {}
DownloadShelfContextMenuView::~DownloadShelfContextMenuView() {}
@@ -55,3 +55,14 @@ void DownloadShelfContextMenuView::OnMenuClosed(
menu_runner_.reset();
}
+
+void DownloadShelfContextMenuView::ExecuteCommand(int command_id,
+ int event_flags) {
+ if (static_cast<DownloadCommands::Command>(command_id) ==
+ DownloadCommands::KEEP) {
+ if (download_item_view_->ShouldAllowDownloadFeedback())
Peter Kasting 2016/10/24 21:39:07 Nit: Can combine this if with the outer one
Jialiu Lin 2016/10/25 21:07:10 Done.
+ download_item_view_->MaybeSubmitDownloadToFeedbackService(
+ DownloadCommands::KEEP);
+ }
+ DownloadShelfContextMenu::ExecuteCommand(command_id, event_flags);
+}

Powered by Google App Engine
This is Rietveld 408576698