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

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

Issue 10799005: Replace the DownloadFileManager with direct ownership (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to LKGR. Created 8 years, 4 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 7d41c65aa2dc045bb85f6c9ff4c49576df4ad320..af02c0805079125ef272dd5e4ebc14a3a55d19d3 100644
--- a/content/browser/download/save_package.cc
+++ b/content/browser/download/save_package.cc
@@ -18,7 +18,6 @@
#include "base/sys_string_conversions.h"
#include "base/threading/thread.h"
#include "base/utf_string_conversions.h"
-#include "content/browser/download/download_file_manager.h"
#include "content/browser/download/download_item_impl.h"
#include "content/browser/download/download_manager_impl.h"
#include "content/browser/download/download_stats.h"
@@ -339,7 +338,8 @@ void SavePackage::OnMHTMLGenerated(const FilePath& path, int64 size) {
// 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_->UpdateProgress(size, CurrentSpeed(), "");
+ download_->OnAllDataSaved(DownloadItem::kEmptyFileHash);
if (!download_manager_->GetDelegate() ||
download_manager_->GetDelegate()->ShouldCompleteDownload(
download_, base::Bind(&SavePackage::Finish, this))) {
@@ -742,9 +742,10 @@ void SavePackage::Finish() {
save_ids));
if (download_) {
- if (save_type_ != content::SAVE_PAGE_TYPE_AS_MHTML)
- download_->OnAllDataSaved(all_save_items_count_,
- DownloadItem::kEmptyFileHash);
+ if (save_type_ != content::SAVE_PAGE_TYPE_AS_MHTML) {
+ download_->UpdateProgress(all_save_items_count_, CurrentSpeed(), "");
+ download_->OnAllDataSaved(DownloadItem::kEmptyFileHash);
+ }
download_->MarkAsComplete();
FinalizeDownloadEntry();
}
« 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