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

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

Issue 9639001: Move download interrupt reasons to content\public (the enum that's used by chrome). The rest keep i… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: nits Created 8 years, 9 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
« no previous file with comments | « content/browser/download/download_net_log_parameters.cc ('k') | content/browser/download/download_stats.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_resource_handler.cc
===================================================================
--- content/browser/download/download_resource_handler.cc (revision 125463)
+++ content/browser/download/download_resource_handler.cc (working copy)
@@ -14,13 +14,14 @@
#include "content/browser/download/download_buffer.h"
#include "content/browser/download/download_create_info.h"
#include "content/browser/download/download_file_manager.h"
+#include "content/browser/download/download_interrupt_reasons_impl.h"
#include "content/browser/download/download_manager_impl.h"
#include "content/browser/download/download_request_handle.h"
#include "content/browser/download/download_stats.h"
-#include "content/browser/download/interrupt_reasons.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/renderer_host/resource_request_info_impl.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/download_interrupt_reasons.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager_delegate.h"
#include "content/public/common/resource_response.h"
@@ -265,15 +266,15 @@
// follow their lead.
if (error_code == net::ERR_CONNECTION_CLOSED)
error_code = net::OK;
- InterruptReason reason =
- ConvertNetErrorToInterruptReason(error_code,
- DOWNLOAD_INTERRUPT_FROM_NETWORK);
+ content::DownloadInterruptReason reason =
+ content::ConvertNetErrorToInterruptReason(
+ error_code, content::DOWNLOAD_INTERRUPT_FROM_NETWORK);
if ((status.status() == net::URLRequestStatus::CANCELED) &&
(status.error() == net::ERR_ABORTED)) {
// TODO(ahendrickson) -- Find a better set of codes to use here, as
// CANCELED/ERR_ABORTED can occur for reasons other than user cancel.
- reason = DOWNLOAD_INTERRUPT_REASON_USER_CANCELED; // User canceled.
+ reason = content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED;
}
if (status.is_success()) {
@@ -281,16 +282,16 @@
if (response_code >= 400) {
switch(response_code) {
case 404: // File Not Found.
- reason = DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT;
+ reason = content::DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT;
break;
case 416: // Range Not Satisfiable.
- reason = DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE;
+ reason = content::DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE;
break;
case 412: // Precondition Failed.
- reason = DOWNLOAD_INTERRUPT_REASON_SERVER_PRECONDITION;
+ reason = content::DOWNLOAD_INTERRUPT_REASON_SERVER_PRECONDITION;
break;
default:
- reason = DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED;
+ reason = content::DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED;
break;
}
}
« no previous file with comments | « content/browser/download/download_net_log_parameters.cc ('k') | content/browser/download/download_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698