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

Unified Diff: content/browser/download/download_file_impl.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 | « no previous file | content/browser/download/download_resource_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_file_impl.cc
diff --git a/content/browser/download/download_file_impl.cc b/content/browser/download/download_file_impl.cc
index f7f190a9f3a5901eac6bde1f26db87ee6f0a7db8..230f91c066389cfcfab66f522d1b0c22ab34e243 100644
--- a/content/browser/download/download_file_impl.cc
+++ b/content/browser/download/download_file_impl.cc
@@ -183,6 +183,7 @@ void DownloadFileImpl::StreamActive() {
result = AppendDataToFile(
incoming_data.get()->data(), incoming_data_size);
disk_writes_time_ += (base::TimeTicks::Now() - write_start);
+ bytes_seen_ += incoming_data_size;
total_incoming_data_size += incoming_data_size;
reason = content::ConvertNetErrorToInterruptReason(
result, content::DOWNLOAD_INTERRUPT_FROM_DISK);
@@ -221,7 +222,6 @@ void DownloadFileImpl::StreamActive() {
if (total_incoming_data_size)
download_stats::RecordFileThreadReceiveBuffers(num_buffers);
- bytes_seen_ += total_incoming_data_size;
download_stats::RecordContiguousWriteTime(now - start);
« no previous file with comments | « no previous file | content/browser/download/download_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698