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

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

Issue 2769933003: Add more UMA to record whether parallel download is completed/interrupted/cancelled (Closed)
Patch Set: rebase 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
« no previous file with comments | « no previous file | content/browser/download/download_stats.h » ('j') | 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 71758ea0f427250204f951a03ba493d4737dccce..81073585b516aa4132a55cd7f41c8c6d63573e2d 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -1280,7 +1280,7 @@ void DownloadItemImpl::Start(
UpdateValidatorsOnResumption(new_create_info);
if (state_ == INITIAL_INTERNAL && job_->UsesParallelRequests())
- RecordDownloadCount(USES_PARALLEL_REQUESTS);
+ RecordParallelDownloadCount(START_COUNT);
TransitionTo(TARGET_PENDING_INTERNAL);
@@ -1573,6 +1573,8 @@ void DownloadItemImpl::Completed() {
if (!GetBrowserContext()->IsOffTheRecord()) {
RecordDownloadCount(COMPLETED_COUNT_NORMAL_PROFILE);
}
+ if (job_ && job_->UsesParallelRequests())
+ RecordParallelDownloadCount(COMPLETED_COUNT);
if (auto_opened_) {
// If it was already handled by the delegate, do nothing.
@@ -1703,11 +1705,14 @@ void DownloadItemImpl::InterruptWithPartialState(
}
RecordDownloadCount(CANCELLED_COUNT);
+ if (job_ && job_->UsesParallelRequests())
+ RecordParallelDownloadCount(CANCELLED_COUNT);
TransitionTo(CANCELLED_INTERNAL);
return;
}
- RecordDownloadInterrupted(reason, received_bytes_, total_bytes_);
+ RecordDownloadInterrupted(reason, received_bytes_, total_bytes_,
+ job_ && job_->UsesParallelRequests());
if (!GetWebContents())
RecordDownloadCount(INTERRUPTED_WITHOUT_WEBCONTENTS);
« no previous file with comments | « no previous file | content/browser/download/download_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698