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

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

Issue 16007017: [Resumption 10/12] Use DI::IsDone to check for terminal downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 34e4bbeb90739dc72ca95e9044e3bd49a3f2a2b5..f7555ea2ad481ee6482ce73038ba725ecd82f9e0 100644
--- a/chrome/browser/download/download_shelf_context_menu.cc
+++ b/chrome/browser/download/download_shelf_context_menu.cc
@@ -129,7 +129,7 @@ void DownloadShelfContextMenu::ExecuteCommand(int command_id, int event_flags) {
// It is possible for the download to complete before the user clicks the
// menu item, recheck if the download is in progress state before toggling
// pause.
- if (download_item_->IsPartialDownload()) {
+ if (download_item_->GetState() == DownloadItem::IN_PROGRESS) {
if (download_item_->IsPaused())
download_item_->Resume();
else
@@ -183,8 +183,7 @@ string16 DownloadShelfContextMenu::GetLabelForCommandId(int command_id) const {
case SHOW_IN_FOLDER:
return l10n_util::GetStringUTF16(IDS_DOWNLOAD_MENU_SHOW);
case OPEN_WHEN_COMPLETE:
- if (download_item_ &&
- download_item_->GetState() == DownloadItem::IN_PROGRESS)
+ if (download_item_ && download_item_->IsPartialDownload())
Randy Smith (Not in Mondays) 2013/06/05 20:21:44 Do we persist the open state across browser restar
asanka 2013/06/05 21:33:47 We persist the "opened" state, but not the "will o
return l10n_util::GetStringUTF16(IDS_DOWNLOAD_MENU_OPEN_WHEN_COMPLETE);
return l10n_util::GetStringUTF16(IDS_DOWNLOAD_MENU_OPEN);
case ALWAYS_OPEN_TYPE:

Powered by Google App Engine
This is Rietveld 408576698