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

Unified Diff: chrome/browser/renderer_host/cross_site_resource_handler.cc

Issue 7276: Adding security info to canceled requests (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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: chrome/browser/renderer_host/cross_site_resource_handler.cc
===================================================================
--- chrome/browser/renderer_host/cross_site_resource_handler.cc (revision 9948)
+++ chrome/browser/renderer_host/cross_site_resource_handler.cc (working copy)
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <string>
+
#include "chrome/browser/renderer_host/cross_site_resource_handler.h"
#include "chrome/browser/renderer_host/render_view_host.h"
@@ -129,11 +131,13 @@
bool CrossSiteResourceHandler::OnResponseCompleted(
int request_id,
- const URLRequestStatus& status) {
+ const URLRequestStatus& status,
+ const std::string& security_info) {
if (!in_cross_site_transition_) {
if (has_started_response_) {
// We've already completed the transition, so just pass it through.
- return next_handler_->OnResponseCompleted(request_id, status);
+ return next_handler_->OnResponseCompleted(request_id, status,
+ security_info);
} else {
// Some types of failures will call OnResponseCompleted without calling
// CrossSiteResourceHandler::OnResponseStarted.
@@ -145,7 +149,8 @@
new CancelPendingRenderViewTask(render_process_host_id_,
render_view_id_);
rdh_->ui_loop()->PostTask(FROM_HERE, task);
- return next_handler_->OnResponseCompleted(request_id, status);
+ return next_handler_->OnResponseCompleted(request_id, status,
+ security_info);
} else {
// An error occured, we should wait now for the cross-site transition,
// so that the error message (e.g., 404) can be displayed to the user.
@@ -161,6 +166,7 @@
// We have to buffer the call until after the transition completes.
completed_during_transition_ = true;
completed_status_ = status;
+ completed_security_info_ = security_info;
// Return false to tell RDH not to notify the world or clean up the
// pending request. We will do so in ResumeResponse.
@@ -201,7 +207,8 @@
// If the response completed during the transition, notify the next
// event handler.
if (completed_during_transition_) {
- next_handler_->OnResponseCompleted(request_id_, completed_status_);
+ next_handler_->OnResponseCompleted(request_id_, completed_status_,
+ completed_security_info_);
// Since we didn't notify the world or clean up the pending request in
// RDH::OnResponseCompleted during the transition, we should do it now.

Powered by Google App Engine
This is Rietveld 408576698