diff options
author | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-02 20:13:28 +0000 |
---|---|---|
committer | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-02 20:13:28 +0000 |
commit | 704359693f5c8507635155ae117c466a7149065a (patch) | |
tree | 55778bdae67f960440441085372fc98c1f974c80 /net/http/http_cache.cc | |
parent | 89b2312b5aca51da726b93e966842ffd5f642402 (diff) | |
download | chromium_src-704359693f5c8507635155ae117c466a7149065a.zip chromium_src-704359693f5c8507635155ae117c466a7149065a.tar.gz chromium_src-704359693f5c8507635155ae117c466a7149065a.tar.bz2 |
Inform disk cache of WebKit memory cache hits.
BUG=37112
TEST=net_unittests
Review URL: http://codereview.chromium.org/7461106
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95145 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache.cc')
-rw-r--r-- | net/http/http_cache.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc index 157059df..c1bb0d8 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()) |