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

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

Issue 10696043: Shifted DownloadFile to exporting DownloadInterruptReasons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to TOT. Created 8 years, 6 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_file_manager.cc
diff --git a/content/browser/download/download_file_manager.cc b/content/browser/download/download_file_manager.cc
index f379823852d2f67db940032981d842e9cd03cb61..4fc4a86f991362d07e631f7e03a77434912e5dbe 100644
--- a/content/browser/download/download_file_manager.cc
+++ b/content/browser/download/download_file_manager.cc
@@ -100,8 +100,7 @@ void DownloadFileManager::CreateDownloadFile(
info.get(), stream.Pass(), download_manager, get_hash, bound_net_log));
content::DownloadInterruptReason interrupt_reason(
- content::ConvertNetErrorToInterruptReason(
- download_file->Initialize(), content::DOWNLOAD_INTERRUPT_FROM_DISK));
+ download_file->Initialize());
if (interrupt_reason == content::DOWNLOAD_INTERRUPT_REASON_NONE) {
DCHECK(GetDownloadFile(info->download_id) == NULL);
downloads_[info->download_id] = download_file.release();
@@ -213,8 +212,9 @@ void DownloadFileManager::RenameDownloadFile(
}
// Do the actual rename
- net::Error rename_error = download_file->Rename(new_path);
- if (net::OK != rename_error) {
+ content::DownloadInterruptReason rename_error =
+ download_file->Rename(new_path);
+ if (content::DOWNLOAD_INTERRUPT_REASON_NONE != rename_error) {
DownloadManager* download_manager = download_file->GetDownloadManager();
DCHECK(download_manager);
@@ -225,9 +225,7 @@ void DownloadFileManager::RenameDownloadFile(
global_id.local(),
download_file->BytesSoFar(),
download_file->GetHashState(),
- content::ConvertNetErrorToInterruptReason(
- rename_error,
- content::DOWNLOAD_INTERRUPT_FROM_DISK)));
+ rename_error));
new_path.clear();
}
« no previous file with comments | « content/browser/download/download_file_impl.cc ('k') | content/browser/download/download_file_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698