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

Unified Diff: content/browser/download/download_item_impl.cc

Issue 2750713003: Add UMA for estimating disk bandwidth and the time saved with parallel download (Closed)
Patch Set: don't record UMA after pause Created 3 years, 9 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: content/browser/download/download_item_impl.cc
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index f118a476be598052f23acd1ffe392e303b084e39..0ea6618a5e5e5f9ffaf17da6677a2247871f56ae 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -378,6 +378,13 @@ void DownloadItemImpl::Pause() {
case TARGET_PENDING_INTERNAL:
job_->Pause();
UpdateObservers();
+ if (download_file_) {
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
+ base::Bind(&DownloadFile::Pause,
+ // Safe because we control download file lifetime.
+ base::Unretained(download_file_.get())));
+ }
return;
case MAX_DOWNLOAD_INTERNAL_STATE:

Powered by Google App Engine
This is Rietveld 408576698