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

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: Merged to LKGR. 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
« no previous file with comments | « chrome/browser/download/download_item.h ('k') | chrome/browser/download/download_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_item.cc
diff --git a/chrome/browser/download/download_item.cc b/chrome/browser/download/download_item.cc
index 2c4ba1e5e98aab05938356b3acd2e187c1300c99..bf6e533db3246b26a0914174384f2802091a6c8c 100644
--- a/chrome/browser/download/download_item.cc
+++ b/chrome/browser/download/download_item.cc
@@ -154,7 +154,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),
@@ -499,7 +499,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();
}
« no previous file with comments | « chrome/browser/download/download_item.h ('k') | chrome/browser/download/download_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698