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

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

Issue 10912173: Replace the DownloadFileManager with direct ownership of DownloadFileImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to LKGR (r162700) Created 8 years, 2 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/save_package.cc
diff --git a/content/browser/download/save_package.cc b/content/browser/download/save_package.cc
index 1ec2a61375f606db8030d9eee0fdcd80fa4502d3..cc02d9c6f5193aa8602e8092b6dbcaa9d77709db 100644
--- a/content/browser/download/save_package.cc
+++ b/content/browser/download/save_package.cc
@@ -340,10 +340,11 @@ void SavePackage::OnMHTMLGenerated(const FilePath& path, int64 size) {
// with SavePackage flow.
if (download_->IsInProgress()) {
download_->SetTotalBytes(size);
+ download_->UpdateProgress(size, 0, "");
// Must call OnAllDataSaved here in order for
// GDataDownloadObserver::ShouldUpload() to return true.
// ShouldCompleteDownload() may depend on the gdata uploader to finish.
- download_->OnAllDataSaved(size, DownloadItem::kEmptyFileHash);
+ download_->OnAllDataSaved(DownloadItem::kEmptyFileHash);
}
if (!download_manager_->GetDelegate()) {
@@ -757,8 +758,8 @@ void SavePackage::Finish() {
// with SavePackage flow.
if (download_->IsInProgress()) {
if (save_type_ != content::SAVE_PAGE_TYPE_AS_MHTML) {
- download_->OnAllDataSaved(all_save_items_count_,
- DownloadItem::kEmptyFileHash);
+ download_->UpdateProgress(all_save_items_count_, CurrentSpeed(), "");
+ download_->OnAllDataSaved(DownloadItem::kEmptyFileHash);
}
download_->MarkAsComplete();
}
« no previous file with comments | « content/browser/download/mock_download_file.cc ('k') | content/browser/renderer_host/resource_dispatcher_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698