summaryrefslogtreecommitdiffstats
path: root/net/http/http_cache_transaction.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/http/http_cache_transaction.cc')
-rw-r--r--net/http/http_cache_transaction.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index a12a64f..3fef3a7 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -1,4 +1,5 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011, 2012 Code Aurora Forum. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -34,6 +35,8 @@
#include "net/http/http_transaction.h"
#include "net/http/http_util.h"
#include "net/http/partial_data.h"
+#include "net/http/preconnect.h"
+#include "net/http/net-plugin-bridge.h"
using base::Time;
@@ -1643,13 +1646,17 @@ bool HttpCache::Transaction::RequiresValidation() {
return true;
if (response_.headers->RequiresValidation(
- response_.request_time, response_.response_time, Time::Now()))
+ response_.request_time, response_.response_time, Time::Now())) {
+ ObserveRevalidation(&response_, request_, cache_);
return true;
+ }
// Since Vary header computation is fairly expensive, we save it for last.
if (response_.vary_data.is_valid() &&
- !response_.vary_data.MatchesRequest(*request_, *response_.headers))
+ !response_.vary_data.MatchesRequest(*request_, *response_.headers)) {
+ ObserveRevalidation(&response_, request_, cache_);
return true;
+ }
return false;
}