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

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

Issue 10695062: Improve download performance statistics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Avoid division by zero errors. Created 8 years, 6 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 | « content/browser/download/download_file_impl.cc ('k') | 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_resource_handler.cc
diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc
index 2e4f6f0ea5599a8ac8f061353e46e641b9d630bd..175a5b7ec305b1c1a32e2f5e74e517ea8183d5fa 100644
--- a/content/browser/download/download_resource_handler.cc
+++ b/content/browser/download/download_resource_handler.cc
@@ -349,6 +349,8 @@ bool DownloadResourceHandler::OnResponseCompleted(
}
download_stats::RecordAcceptsRanges(accept_ranges_, bytes_read_);
+ download_stats::RecordNetworkBlockage(
+ base::TimeTicks::Now() - download_start_time_, total_pause_time_);
CallStartedCB(DownloadId(), error_code);
@@ -360,11 +362,6 @@ bool DownloadResourceHandler::OnResponseCompleted(
stream_writer_.reset(); // We no longer need the stream.
read_buffer_ = NULL;
- // Stats
- download_stats::RecordNetworkBandwidth(
- bytes_read_, base::TimeTicks::Now() - download_start_time_,
- total_pause_time_);
-
return true;
}
« no previous file with comments | « content/browser/download/download_file_impl.cc ('k') | content/browser/download/download_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698