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

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

Issue 14697023: downloads: Improve download rate estimation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment typo Created 7 years, 7 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/base_file.cc
diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc
index 687c321c9c8d212d983b4492399ef8de41a0ad80..e649eedfe2df51c48fb7ed10c4849d7e39fd89c2 100644
--- a/content/browser/download/base_file.cc
+++ b/content/browser/download/base_file.cc
@@ -218,11 +218,6 @@ DownloadInterruptReason BaseFile::AnnotateWithSourceInformation() {
}
#endif
-int64 BaseFile::CurrentSpeed() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- return CurrentSpeedAtTime(base::TimeTicks::Now());
-}
-
bool BaseFile::GetHash(std::string* hash) {
DCHECK(!detached_);
hash->assign(reinterpret_cast<const char*>(sha256_hash_),
@@ -339,12 +334,6 @@ void BaseFile::ClearStream() {
bound_net_log_.EndEvent(net::NetLog::TYPE_DOWNLOAD_FILE_OPENED);
}
-int64 BaseFile::CurrentSpeedAtTime(base::TimeTicks current_time) const {
- base::TimeDelta diff = current_time - start_tick_;
- int64 diff_ms = diff.InMilliseconds();
- return diff_ms == 0 ? 0 : bytes_so_far() * 1000 / diff_ms;
-}
-
DownloadInterruptReason BaseFile::LogNetError(
const char* operation,
net::Error error) {

Powered by Google App Engine
This is Rietveld 408576698