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

Unified Diff: chrome/browser/renderer_host/safe_browsing_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/safe_browsing_resource_handler.cc
===================================================================
--- chrome/browser/renderer_host/safe_browsing_resource_handler.cc (revision 9948)
+++ chrome/browser/renderer_host/safe_browsing_resource_handler.cc (working copy)
@@ -101,7 +101,8 @@
}
bool SafeBrowsingResourceHandler::OnResponseCompleted(
- int request_id, const URLRequestStatus& status) {
+ int request_id, const URLRequestStatus& status,
+ const std::string& security_info) {
if ((in_safe_browsing_check_ ||
safe_browsing_result_ != SafeBrowsingService::URL_SAFE) &&
status.status() == URLRequestStatus::FAILED &&
@@ -111,10 +112,11 @@
// page.
queued_error_.reset(new URLRequestStatus(status));
queued_error_request_id_ = request_id;
+ queued_security_info_ = security_info;
return true;
}
- return next_handler_->OnResponseCompleted(request_id, status);
+ return next_handler_->OnResponseCompleted(request_id, status, security_info);
}
// SafeBrowsingService::Client implementation, called on the IO thread once
@@ -140,8 +142,10 @@
if (queued_error_.get()) {
next_handler_->OnResponseCompleted(
- queued_error_request_id_, *queued_error_.get());
+ queued_error_request_id_, *queued_error_.get(),
+ queued_security_info_);
queued_error_.reset();
+ queued_security_info_.clear();
}
Release();
@@ -168,8 +172,10 @@
if (queued_error_.get()) {
next_handler_->OnResponseCompleted(
- queued_error_request_id_, *queued_error_.get());
+ queued_error_request_id_, *queued_error_.get(),
+ queued_security_info_);
queued_error_.reset();
+ queued_security_info_.clear();
}
} else {
rdh_->CancelRequest(render_process_host_id_, paused_request_id_, false);

Powered by Google App Engine
This is Rietveld 408576698