diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-14 20:48:43 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-14 20:48:43 +0000 |
commit | dd8a3588142c286b63b4e668afca220e1e2b61af (patch) | |
tree | 996bf2894a3d81731eed632616f11c22b0c5e517 /net/http/http_cache.cc | |
parent | cb7fbf95cb78b6d299c817f9322a6caa32665be6 (diff) | |
download | chromium_src-dd8a3588142c286b63b4e668afca220e1e2b61af.zip chromium_src-dd8a3588142c286b63b4e668afca220e1e2b61af.tar.gz chromium_src-dd8a3588142c286b63b4e668afca220e1e2b61af.tar.bz2 |
Http Cache: Add code for simulating an infinite HTTP cache.
This is not completely wired yet.
BUG=147383
TEST=net_unittests
TBR=gavinp@chromium.org
Full review http://codereview.chromium.org/10909136/
Review URL: https://codereview.chromium.org/10919298
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache.cc')
-rw-r--r-- | net/http/http_cache.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc index 0436bc4..32ae60a 100644 --- a/net/http/http_cache.cc +++ b/net/http/http_cache.cc @@ -352,7 +352,7 @@ void HttpCache::WriteMetadata(const GURL& url, CreateBackend(NULL, net::CompletionCallback()); } - HttpCache::Transaction* trans = new HttpCache::Transaction(this, NULL); + HttpCache::Transaction* trans = new HttpCache::Transaction(this, NULL, NULL); MetadataWriter* writer = new MetadataWriter(trans); // The writer will self destruct when done. @@ -390,7 +390,8 @@ void HttpCache::OnExternalCacheHit(const GURL& url, void HttpCache::InitializeInfiniteCache(const FilePath& path) { if (base::FieldTrialList::FindFullName("InfiniteCache") != "Yes") return; - // TODO(rvargas): initialize the infinite cache + // To be enabled after everything is fully wired. + // infinite_cache_.Init(path); } int HttpCache::CreateTransaction(scoped_ptr<HttpTransaction>* trans, @@ -401,7 +402,10 @@ int HttpCache::CreateTransaction(scoped_ptr<HttpTransaction>* trans, CreateBackend(NULL, net::CompletionCallback()); } - trans->reset(new HttpCache::Transaction(this, delegate)); + InfiniteCacheTransaction* infinite_cache_transaction = + infinite_cache_.CreateInfiniteCacheTransaction(); + trans->reset(new HttpCache::Transaction(this, delegate, + infinite_cache_transaction)); return OK; } |