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

Unified Diff: chrome/renderer/security_filter_peer.cc

Issue 138513002: Plumb network stack information about existence of cached copy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated comments from Matt & Ricardo. Created 6 years, 11 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/renderer/security_filter_peer.cc
diff --git a/chrome/renderer/security_filter_peer.cc b/chrome/renderer/security_filter_peer.cc
index 9799ca0d9cceecf1743e8b5bf11f242c707f99ec..c0e5fd2969bffb3ee4b2686fc049b7212b4cfa58 100644
--- a/chrome/renderer/security_filter_peer.cc
+++ b/chrome/renderer/security_filter_peer.cc
@@ -93,6 +93,7 @@ void SecurityFilterPeer::OnReceivedData(const char* data,
void SecurityFilterPeer::OnCompletedRequest(
int error_code,
bool was_ignored_by_handler,
+ bool stale_copy_in_cache,
const std::string& security_info,
const base::TimeTicks& completion_time) {
NOTREACHED();
@@ -154,6 +155,7 @@ void BufferedPeer::OnReceivedData(const char* data,
void BufferedPeer::OnCompletedRequest(int error_code,
bool was_ignored_by_handler,
+ bool stale_copy_in_cache,
const std::string& security_info,
const base::TimeTicks& completion_time) {
// Make sure we delete ourselves at the end of this call.
@@ -163,8 +165,9 @@ void BufferedPeer::OnCompletedRequest(int error_code,
if (error_code != net::OK || !DataReady()) {
// Pretend we failed to load the resource.
original_peer_->OnReceivedResponse(response_info_);
- original_peer_->OnCompletedRequest(net::ERR_ABORTED, false, security_info,
- completion_time);
+ original_peer_->OnCompletedRequest(net::ERR_ABORTED, false,
+ stale_copy_in_cache,
+ security_info, completion_time);
return;
}
@@ -174,7 +177,8 @@ void BufferedPeer::OnCompletedRequest(int error_code,
static_cast<int>(data_.size()),
-1);
original_peer_->OnCompletedRequest(error_code, was_ignored_by_handler,
- security_info, completion_time);
+ stale_copy_in_cache, security_info,
+ completion_time);
}
////////////////////////////////////////////////////////////////////////////////
@@ -207,6 +211,7 @@ void ReplaceContentPeer::OnReceivedData(const char* data,
void ReplaceContentPeer::OnCompletedRequest(
int error_code,
bool was_ignored_by_handler,
+ bool stale_copy_in_cache,
const std::string& security_info,
const base::TimeTicks& completion_time) {
webkit_glue::ResourceResponseInfo info;
@@ -220,6 +225,7 @@ void ReplaceContentPeer::OnCompletedRequest(
-1);
original_peer_->OnCompletedRequest(net::OK,
false,
+ stale_copy_in_cache,
security_info,
completion_time);

Powered by Google App Engine
This is Rietveld 408576698