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

Unified Diff: content/browser/renderer_host/resource_loader.cc

Issue 10640019: Remove the HANDLED_EXTERNALLY status code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase + fix nits Created 8 years, 3 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/renderer_host/resource_loader.cc
diff --git a/content/browser/renderer_host/resource_loader.cc b/content/browser/renderer_host/resource_loader.cc
index 0cbc45569af852605b175c94c2c09cb4e46e4dcd..0515a3c69e5310f2b89f635f10b68324167435d8 100644
--- a/content/browser/renderer_host/resource_loader.cc
+++ b/content/browser/renderer_host/resource_loader.cc
@@ -28,7 +28,7 @@ namespace {
void PopulateResourceResponse(net::URLRequest* request,
ResourceResponse* response) {
- response->head.status = request->status();
+ response->head.error_code = request->status().error();
response->head.request_time = request->request_time();
response->head.response_time = request->response_time();
response->head.headers = request->response_headers();
@@ -78,7 +78,7 @@ ResourceLoader::~ResourceLoader() {
void ResourceLoader::StartRequest() {
if (delegate_->HandleExternalProtocol(this, request_->url())) {
- CancelRequestInternal(net::ERR_UNKNOWN_URL_SCHEME, false);
+ CancelAndIgnore();
return;
}
@@ -101,6 +101,12 @@ void ResourceLoader::CancelRequest(bool from_renderer) {
CancelRequestInternal(net::ERR_ABORTED, from_renderer);
}
+void ResourceLoader::CancelAndIgnore() {
+ ResourceRequestInfoImpl* info = GetRequestInfo();
+ info->set_was_ignored_by_handler(true);
+ CancelRequest(false);
+}
+
void ResourceLoader::ReportUploadProgress() {
ResourceRequestInfoImpl* info = GetRequestInfo();
@@ -205,7 +211,7 @@ void ResourceLoader::OnReceivedRedirect(net::URLRequest* unused,
if (delegate_->HandleExternalProtocol(this, new_url)) {
// The request is complete so we can remove it.
- CancelRequestInternal(net::ERR_UNKNOWN_URL_SCHEME, false);
+ CancelAndIgnore();
return;
}
« no previous file with comments | « content/browser/renderer_host/resource_loader.h ('k') | content/browser/renderer_host/resource_request_info_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698