summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/buffered_resource_handler.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-08 07:41:31 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-08 07:41:31 +0000
commitc4891b363f7d9ca534880d25524adeb810ff3ff0 (patch)
tree8af2885644966f047a688b66cd2d16f9db1afd9c /chrome/browser/renderer_host/buffered_resource_handler.cc
parentb0c819facfd2222853b1fe69a2e0891e17db6791 (diff)
downloadchromium_src-c4891b363f7d9ca534880d25524adeb810ff3ff0.zip
chromium_src-c4891b363f7d9ca534880d25524adeb810ff3ff0.tar.gz
chromium_src-c4891b363f7d9ca534880d25524adeb810ff3ff0.tar.bz2
Landing again the CL that adds security info to canceled requests (last time it was causing sync XMLHttpRequests to hang, breaking many layout tests).
TBR=darin Review URL: http://codereview.chromium.org/39321 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11221 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/buffered_resource_handler.cc')
-rw-r--r--chrome/browser/renderer_host/buffered_resource_handler.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/renderer_host/buffered_resource_handler.cc b/chrome/browser/renderer_host/buffered_resource_handler.cc
index e1144c2..c49666c7 100644
--- a/chrome/browser/renderer_host/buffered_resource_handler.cc
+++ b/chrome/browser/renderer_host/buffered_resource_handler.cc
@@ -72,8 +72,10 @@ bool BufferedResourceHandler::OnResponseStarted(int request_id,
bool BufferedResourceHandler::OnResponseCompleted(
- int request_id, const URLRequestStatus& status) {
- return real_handler_->OnResponseCompleted(request_id, status);
+ int request_id,
+ const URLRequestStatus& status,
+ const std::string& security_info) {
+ return real_handler_->OnResponseCompleted(request_id, status, security_info);
}
// We'll let the original event handler provide a buffer, and reuse it for
@@ -242,7 +244,7 @@ bool BufferedResourceHandler::CompleteResponseStarted(int request_id,
// own error page instead of triggering a download.
// TODO(abarth): We should abstract the response_code test, but this kind
// of check is scattered throughout our codebase.
- request_->CancelWithError(net::ERR_FILE_NOT_FOUND);
+ request_->SimulateError(net::ERR_FILE_NOT_FOUND);
return false;
}
@@ -270,7 +272,8 @@ bool BufferedResourceHandler::CompleteResponseStarted(int request_id,
// handled by an external source (the browser's DownloadManager).
real_handler_->OnResponseStarted(info->request_id, response_);
URLRequestStatus status(URLRequestStatus::HANDLED_EXTERNALLY, 0);
- real_handler_->OnResponseCompleted(info->request_id, status);
+ real_handler_->OnResponseCompleted(info->request_id, status,
+ std::string());
// Ditch the old async handler that talks to the renderer for the new
// download handler that talks to the DownloadManager.