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

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

Issue 10640019: Remove the HANDLED_EXTERNALLY status code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: revert removing DCHECK from URLRequest::DoCancel Created 8 years, 5 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/buffered_resource_handler.cc
diff --git a/content/browser/renderer_host/buffered_resource_handler.cc b/content/browser/renderer_host/buffered_resource_handler.cc
index adb96087854dff053caeda14b3561ffd62e03331..ce26f8fc13a1ba2f7d361065041c733182df2430 100644
--- a/content/browser/renderer_host/buffered_resource_handler.cc
+++ b/content/browser/renderer_host/buffered_resource_handler.cc
@@ -15,6 +15,7 @@
#include "content/browser/plugin_service_impl.h"
#include "content/browser/renderer_host/resource_dispatcher_host_impl.h"
#include "content/browser/renderer_host/resource_request_info_impl.h"
+#include "content/browser/renderer_host/resource_request_info_impl.h"
#include "content/browser/renderer_host/x509_user_cert_resource_handler.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
@@ -210,6 +211,14 @@ void BufferedResourceHandler::Cancel() {
controller()->Cancel();
}
+void BufferedResourceHandler::CancelWithError(int error) {
+ controller()->CancelWithError(error);
+}
+
+void BufferedResourceHandler::HandledExternally() {
+ controller()->HandledExternally();
+}
+
bool BufferedResourceHandler::ProcessResponse(bool* defer) {
DCHECK_EQ(STATE_PROCESSING, state_);
@@ -349,7 +358,11 @@ bool BufferedResourceHandler::UseAlternateNextHandler(
bool defer_ignored = false;
next_handler_->OnResponseStarted(request_id, response_, &defer_ignored);
DCHECK(!defer_ignored);
- net::URLRequestStatus status(net::URLRequestStatus::HANDLED_EXTERNALLY, 0);
+ net::URLRequestStatus status(net::URLRequestStatus::CANCELED,
+ net::ERR_ABORTED);
+ ResourceRequestInfoImpl* info =
+ ResourceRequestInfoImpl::ForRequest(request_);
+ info->set_handled_externally(true);
next_handler_->OnResponseCompleted(request_id, status, std::string());
// This is handled entirely within the new ResourceHandler, so just reset the

Powered by Google App Engine
This is Rietveld 408576698