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

Unified Diff: chrome/common/security_filter_peer.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/common/security_filter_peer.cc
===================================================================
--- chrome/common/security_filter_peer.cc (revision 9948)
+++ chrome/common/security_filter_peer.cc (working copy)
@@ -114,7 +114,8 @@
NOTREACHED();
}
-void SecurityFilterPeer::OnCompletedRequest(const URLRequestStatus& status) {
+void SecurityFilterPeer::OnCompletedRequest(const URLRequestStatus& status,
+ const std::string& security_info) {
NOTREACHED();
}
@@ -175,7 +176,8 @@
data_.append(data, len);
}
-void BufferedPeer::OnCompletedRequest(const URLRequestStatus& status) {
+void BufferedPeer::OnCompletedRequest(const URLRequestStatus& status,
+ const std::string& security_info) {
// Make sure we delete ourselves at the end of this call.
scoped_ptr<BufferedPeer> this_deleter(this);
@@ -184,7 +186,7 @@
// Pretend we failed to load the resource.
original_peer_->OnReceivedResponse(response_info_, true);
URLRequestStatus status(URLRequestStatus::CANCELED, 0);
- original_peer_->OnCompletedRequest(status);
+ original_peer_->OnCompletedRequest(status, security_info);
return;
}
@@ -192,7 +194,7 @@
if (!data_.empty())
original_peer_->OnReceivedData(data_.data(),
static_cast<int>(data_.size()));
- original_peer_->OnCompletedRequest(status);
+ original_peer_->OnCompletedRequest(status, security_info);
}
////////////////////////////////////////////////////////////////////////////////
@@ -221,15 +223,17 @@
// Ignore this, we'll serve some alternate content in OnCompletedRequest.
}
-void ReplaceContentPeer::OnCompletedRequest(const URLRequestStatus& status) {
+void ReplaceContentPeer::OnCompletedRequest(const URLRequestStatus& status,
+ const std::string& security_info) {
webkit_glue::ResourceLoaderBridge::ResponseInfo info;
ProcessResponseInfo(info, &info, mime_type_);
+ info.security_info = security_info;
info.content_length = static_cast<int>(data_.size());
original_peer_->OnReceivedResponse(info, true);
if (!data_.empty())
original_peer_->OnReceivedData(data_.data(),
static_cast<int>(data_.size()));
- original_peer_->OnCompletedRequest(URLRequestStatus());
+ original_peer_->OnCompletedRequest(URLRequestStatus(), security_info);
// The request processing is complete, we must delete ourselves.
delete this;

Powered by Google App Engine
This is Rietveld 408576698