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

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

Issue 11711003: Remove the DownloadItem::TogglePause() interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 3e13650a0082a45a96ec1f1d6439a3b37ea51444..02ddccf0e14baa1998f0eaf2b174fa4f5a526399 100644
--- a/chrome/browser/download/download_shelf_context_menu.cc
+++ b/chrome/browser/download/download_shelf_context_menu.cc
@@ -116,8 +116,12 @@ void DownloadShelfContextMenu::ExecuteCommand(int command_id) {
// 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())
- download_item_->TogglePause();
+ if (download_item_->IsPartialDownload()) {
+ if (download_item_->IsPaused())
+ download_item_->Resume();
+ else
+ download_item_->Pause();
+ }
break;
case DISCARD:
download_item_->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD);

Powered by Google App Engine
This is Rietveld 408576698