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

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

Issue 6905049: Detect removed files and reflect the state in chrome://downloads and the download shelf (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Remove REMOVED state from Download.States in downloads.js Created 9 years, 6 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
diff --git a/chrome/browser/download/download_shelf_context_menu.cc b/chrome/browser/download/download_shelf_context_menu.cc
index d019d7a17589b89e2d29ba8e3cf79ff8dccef442..25fdb86e27172f214c9a757a4904e357c7e16266 100644
--- a/chrome/browser/download/download_shelf_context_menu.cc
+++ b/chrome/browser/download/download_shelf_context_menu.cc
@@ -26,7 +26,7 @@ bool DownloadShelfContextMenu::IsCommandIdEnabled(int command_id) const {
switch (command_id) {
case SHOW_IN_FOLDER:
case OPEN_WHEN_COMPLETE:
- return !download_item_->IsCancelled();
+ return download_item_->CanShowInFolder();
case ALWAYS_OPEN_TYPE:
return download_item_->CanOpenDownload();
case CANCEL:
@@ -41,7 +41,7 @@ bool DownloadShelfContextMenu::IsCommandIdEnabled(int command_id) const {
bool DownloadShelfContextMenu::IsCommandIdChecked(int command_id) const {
switch (command_id) {
case OPEN_WHEN_COMPLETE:
- return download_item_->open_when_complete();
+ return download_item_->CanShowInFolder();
case ALWAYS_OPEN_TYPE:
return download_item_->ShouldOpenFileBasedOnExtension();
case TOGGLE_PAUSE:

Powered by Google App Engine
This is Rietveld 408576698