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

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

Issue 10861002: Revert 152213 - Replace the DownloadFileManager with direct ownership of DownloadFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
===================================================================
--- content/browser/download/save_package.cc (revision 152281)
+++ content/browser/download/save_package.cc (working copy)
@@ -18,6 +18,7 @@
#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"
@@ -337,8 +338,7 @@
// Must call OnAllDataSaved here in order for
// GDataDownloadObserver::ShouldUpload() to return true.
// ShouldCompleteDownload() may depend on the gdata uploader to finish.
- download_->UpdateProgress(size, CurrentSpeed(), "");
- download_->OnAllDataSaved(DownloadItem::kEmptyFileHash);
+ download_->OnAllDataSaved(size, DownloadItem::kEmptyFileHash);
if (!download_manager_->GetDelegate() ||
download_manager_->GetDelegate()->ShouldCompleteDownload(
download_, base::Bind(&SavePackage::Finish, this))) {
@@ -741,10 +741,9 @@
save_ids));
if (download_) {
- if (save_type_ != content::SAVE_PAGE_TYPE_AS_MHTML) {
- download_->UpdateProgress(all_save_items_count_, CurrentSpeed(), "");
- download_->OnAllDataSaved(DownloadItem::kEmptyFileHash);
- }
+ if (save_type_ != content::SAVE_PAGE_TYPE_AS_MHTML)
+ download_->OnAllDataSaved(all_save_items_count_,
+ 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