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

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: report interrupted UMA for all downloads 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 507ace3f58836cc192837a19cf459b4915197981..d6e17e8594135dfac607769d7fe74c651373e07c 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -1273,7 +1273,7 @@ void DownloadItemImpl::Start(
UpdateValidatorsOnResumption(new_create_info);
if (state_ == INITIAL_INTERNAL && job_->UsesParallelRequests())
- RecordDownloadCount(USES_PARALLEL_REQUESTS);
+ RecordParallelDownloadCount(PARALLEL_DOWNLOAD_START_COUNT);
TransitionTo(TARGET_PENDING_INTERNAL);
@@ -1563,6 +1563,8 @@ void DownloadItemImpl::Completed() {
end_time_ = base::Time::Now();
TransitionTo(COMPLETE_INTERNAL);
RecordDownloadCompleted(start_tick_, received_bytes_);
+ if (job_ && job_->UsesParallelRequests())
+ RecordParallelDownloadCount(PARALLEL_DOWNLOAD_COMPLETED_COUNT);
if (auto_opened_) {
// If it was already handled by the delegate, do nothing.
@@ -1693,11 +1695,14 @@ void DownloadItemImpl::InterruptWithPartialState(
}
RecordDownloadCount(CANCELLED_COUNT);
+ if (job_ && job_->UsesParallelRequests())
+ RecordParallelDownloadCount(PARALLEL_DOWNLOAD_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') | content/browser/download/download_stats.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698