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

Unified Diff: chrome/browser/extensions/api/downloads/downloads_api.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/extensions/api/downloads/downloads_api.cc
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc
index afc5fb7cb8dde580a590bf957f3f6bf0efbd11c4..c4d314a4554061960345cb9a67fb4917a089f4b6 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
@@ -705,7 +705,7 @@ bool DownloadsPauseFunction::RunImpl() {
error_ = download_extension_errors::kInvalidOperationError;
} else if (!download_item->IsPaused()) {
asanka 2013/01/02 16:44:50 Nit: Since we now have Pause() and Resume(), I don
Randy Smith (Not in Mondays) 2013/01/02 20:16:02 Done.
// If download_item->IsPaused() already then we treat it as a success.
- download_item->TogglePause();
+ download_item->Pause();
}
if (error_.empty())
RecordApiFunctions(DOWNLOADS_FUNCTION_PAUSE);
@@ -727,7 +727,7 @@ bool DownloadsResumeFunction::RunImpl() {
error_ = download_extension_errors::kInvalidOperationError;
} else if (download_item->IsPaused()) {
// If !download_item->IsPaused() already, then we treat it as a success.
- download_item->TogglePause();
+ download_item->Resume();
}
if (error_.empty())
RecordApiFunctions(DOWNLOADS_FUNCTION_RESUME);

Powered by Google App Engine
This is Rietveld 408576698