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

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

Issue 2810133003: Record the parallel download UMA for fresh new downloads (Closed)
Patch Set: fix START_COUNT 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fb6ff4a01339ddf4acc7ed3bbd155e1603e2a7e6..eed60c8672a31a70c12dce50be3f58380c15a969 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -1216,6 +1216,9 @@ void DownloadItemImpl::Start(
download_file_ = std::move(file);
job_ = DownloadJobFactory::CreateJob(this, std::move(req_handle),
new_create_info);
+ if (job_->UsesParallelRequests())
+ RecordParallelDownloadCount(START_COUNT);
+
deferred_interrupt_reason_ = DOWNLOAD_INTERRUPT_REASON_NONE;
if (state_ == CANCELLED_INTERNAL) {
@@ -1265,6 +1268,8 @@ void DownloadItemImpl::Start(
if (state_ == INITIAL_INTERNAL) {
RecordDownloadCount(NEW_DOWNLOAD_COUNT);
+ if (job_->UsesParallelRequests())
+ RecordParallelDownloadCount(NEW_DOWNLOAD_COUNT);
RecordDownloadMimeType(mime_type_);
if (!GetBrowserContext()->IsOffTheRecord()) {
RecordDownloadCount(NEW_DOWNLOAD_COUNT_NORMAL_PROFILE);
@@ -1279,9 +1284,6 @@ void DownloadItemImpl::Start(
if (state_ == RESUMING_INTERNAL)
UpdateValidatorsOnResumption(new_create_info);
- if (state_ == INITIAL_INTERNAL && job_->UsesParallelRequests())
- RecordParallelDownloadCount(START_COUNT);
-
TransitionTo(TARGET_PENDING_INTERNAL);
job_->Start();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698