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

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

Issue 7112011: Change DownloadProcessHandle to be more of an encapsulated class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unneeded include file. 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_item.cc
diff --git a/chrome/browser/download/download_item.cc b/chrome/browser/download/download_item.cc
index f2cc38416a9b55982d4bd73c5a592da86ec1103e..8b5dc01900f5ffeec2783bd2fe0a1e13de31219d 100644
--- a/chrome/browser/download/download_item.cc
+++ b/chrome/browser/download/download_item.cc
@@ -152,7 +152,7 @@ DownloadItem::DownloadItem(DownloadManager* download_manager,
info.has_user_gesture, info.prompt_user_for_save_location,
info.path_uniquifier, false, false,
info.is_extension_install),
- process_handle_(info.process_handle),
+ request_handle_(info.request_handle),
download_id_(info.download_id),
full_path_(info.path),
url_chain_(info.url_chain),
@@ -458,7 +458,10 @@ void DownloadItem::Rename(const FilePath& full_path) {
void DownloadItem::TogglePause() {
DCHECK(IsInProgress());
- download_manager_->PauseDownload(download_id_, !is_paused_);
+ if (is_paused_)
+ request_handle_.ResumeRequest();
+ else
+ request_handle_.PauseRequest();
is_paused_ = !is_paused_;
UpdateObservers();
}

Powered by Google App Engine
This is Rietveld 408576698