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 9c064d20c4edb9003eb6fc74fe782a8be9db49b7..1c0b384cbeabe81034219b2dc4ae04abd8094963 100644 |
--- a/content/browser/download/download_file_impl.cc |
+++ b/content/browser/download/download_file_impl.cc |
@@ -98,6 +98,7 @@ DownloadInterruptReason DownloadFileImpl::AppendDataToFile( |
base::TimeDelta::FromMilliseconds(kUpdatePeriodMs), |
this, &DownloadFileImpl::SendUpdate); |
} |
+ rate_estimator_.Increment(data_len); |
return file_.AppendDataToFile(data, data_len); |
} |
@@ -191,7 +192,7 @@ int64 DownloadFileImpl::BytesSoFar() const { |
} |
int64 DownloadFileImpl::CurrentSpeed() const { |
- return file_.CurrentSpeed(); |
+ return rate_estimator_.GetCountPerSecond(); |
} |
bool DownloadFileImpl::GetHash(std::string* hash) { |