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

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

Issue 2854973003: Fix the Unthrottled download count for parallel download (Closed)
Patch Set: Created 3 years, 8 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_request_core.cc
diff --git a/content/browser/download/download_request_core.cc b/content/browser/download/download_request_core.cc
index 7e8d102d55c6b7b99df107aa0e86eb7f542ffa76..5d0c89d02a1fd8468236119069f43394cd6951d0 100644
--- a/content/browser/download/download_request_core.cc
+++ b/content/browser/download/download_request_core.cc
@@ -180,7 +180,8 @@ std::unique_ptr<net::URLRequest> DownloadRequestCore::CreateRequestOnIOThread(
}
DownloadRequestCore::DownloadRequestCore(net::URLRequest* request,
- Delegate* delegate)
+ Delegate* delegate,
+ bool is_parallel_request)
: delegate_(delegate),
request_(request),
download_id_(DownloadItem::kInvalidId),
@@ -193,7 +194,8 @@ DownloadRequestCore::DownloadRequestCore(net::URLRequest* request,
abort_reason_(DOWNLOAD_INTERRUPT_REASON_NONE) {
DCHECK(request_);
DCHECK(delegate_);
- RecordDownloadCount(UNTHROTTLED_COUNT);
+ if (!is_parallel_request)
+ RecordDownloadCount(UNTHROTTLED_COUNT);
power_save_blocker_.reset(new device::PowerSaveBlocker(
device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension,
device::PowerSaveBlocker::kReasonOther, "Download in progress",
« no previous file with comments | « content/browser/download/download_request_core.h ('k') | content/browser/download/download_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698