diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-14 18:35:21 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-14 18:35:21 +0000 |
commit | fdbaecb0456642a5148b8f5caa7b6bbc27a7ccff (patch) | |
tree | bcb93a97882aa7e9f014ad02dd20c8142b24b2c7 /net/http/http_cache.cc | |
parent | d3a8cfcbb8703ab3c8d8b58bc4fa8e7d7c011a1f (diff) | |
download | chromium_src-fdbaecb0456642a5148b8f5caa7b6bbc27a7ccff.zip chromium_src-fdbaecb0456642a5148b8f5caa7b6bbc27a7ccff.tar.gz chromium_src-fdbaecb0456642a5148b8f5caa7b6bbc27a7ccff.tar.bz2 |
Http Cache: Add code for simulating an infinite HTTP cache.
This is not completely wired yet.
BUg=147383
TEST=net_unittests
Review URL: https://chromiumcodereview.appspot.com/10909136
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156846 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; } |