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

Unified Diff: net/http/http_cache.cc

Issue 7461106: Inform disk cache of WebKit memory cache hits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move http check Created 9 years, 5 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: net/http/http_cache.cc
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 157059df10269303e14b82d5c0f49370bbd24d4d..c1bb0d81c6be1cd783fe5fa65e19564d5313203a 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -463,6 +463,18 @@ void HttpCache::CloseAllConnections() {
session->CloseAllConnections();
}
+void HttpCache::OnExternalCacheHit(const GURL& url,
+ const std::string& http_method) {
+ if (!disk_cache_.get())
+ return;
+
+ HttpRequestInfo request_info;
+ request_info.url = url;
+ request_info.method = http_method;
+ std::string key = GenerateCacheKey(&request_info);
+ disk_cache_->OnExternalCacheHit(key);
+}
+
int HttpCache::CreateTransaction(scoped_ptr<HttpTransaction>* trans) {
// Do lazy initialization of disk cache if needed.
if (!disk_cache_.get())

Powered by Google App Engine
This is Rietveld 408576698