Commit 10603e26 authored by qinmin's avatar qinmin Committed by Commit bot

Record the parallel download UMA for fresh new downloads

Start() can be called on both resumption and fresh new download
This CL records only the parallel downloads that are new

BUG=644352

Review-Url: https://codereview.chromium.org/2810133003
Cr-Commit-Position: refs/heads/master@{#464278}
parent fe082ad7
......@@ -1224,6 +1224,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) {
......@@ -1273,6 +1276,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);
......@@ -1287,9 +1292,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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment