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

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

Issue 9363001: Eliminate DownloadProgressUpdated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tests work Created 8 years, 10 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_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 617494f2ef6d273f43c1e37a307adf865c3fe119..70497853ab4183d557d20ab364339ff8beb99adf 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -450,7 +450,6 @@ void DownloadManagerImpl::ContinueDownloadWithPath(
<< " download = " << download->DebugString(true);
in_progress_[download_id] = download;
- UpdateDownloadProgress(); // Reflect entry into in_progress_.
// Rename to intermediate name.
FilePath download_path;
@@ -497,7 +496,6 @@ void DownloadManagerImpl::UpdateDownload(int32 download_id,
DownloadItem* download = it->second;
if (download->IsInProgress()) {
download->UpdateProgress(bytes_so_far, bytes_per_sec, hash_state);
- UpdateDownloadProgress(); // Reflect size updates.
delegate_->UpdateItemInPersistentStore(download);
}
}
@@ -611,7 +609,6 @@ void DownloadManagerImpl::MaybeCompleteDownload(DownloadItem* download) {
// Remove the id from in_progress
in_progress_.erase(download->GetId());
- UpdateDownloadProgress(); // Reflect removal from in_progress_.
delegate_->UpdateItemInPersistentStore(download);
@@ -728,7 +725,6 @@ void DownloadManagerImpl::RemoveFromActiveList(DownloadItem* download) {
if (download->GetDbHandle() != DownloadItem::kUninitializedHandle) {
in_progress_.erase(download->GetId());
active_downloads_.erase(download->GetId());
- UpdateDownloadProgress(); // Reflect removal from in_progress_.
delegate_->UpdateItemInPersistentStore(download);
}
}
@@ -746,10 +742,6 @@ void DownloadManagerImpl::SetDownloadManagerDelegate(
delegate_ = delegate;
}
-void DownloadManagerImpl::UpdateDownloadProgress() {
- delegate_->DownloadProgressUpdated();
-}
-
int DownloadManagerImpl::RemoveDownloadItems(
const DownloadVector& pending_deletes) {
if (pending_deletes.empty())
« no previous file with comments | « content/browser/download/download_manager_impl.h ('k') | content/public/browser/download_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698