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

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: Sync'd to r175145. Created 7 years, 12 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 43c85ed2a6390c998bfad5f644934000a02593ae..64236f700e7f41f9a198f97df191d70e127cd0e6 100644
--- a/chrome/browser/download/download_shelf_context_menu.cc
+++ b/chrome/browser/download/download_shelf_context_menu.cc
@@ -112,8 +112,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);
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/extensions/api/downloads/downloads_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698