diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-11 23:25:46 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-11 23:25:46 +0000 |
commit | ea75b0a85c31090eea5746b34d45add742607af2 (patch) | |
tree | f048ba9f289e076f06cdaca85ce2a3afa99f99a1 /net/http/http_cache_unittest.cc | |
parent | 517c34618870253ee2287ae10377870a2b754d70 (diff) | |
download | chromium_src-ea75b0a85c31090eea5746b34d45add742607af2.zip chromium_src-ea75b0a85c31090eea5746b34d45add742607af2.tar.gz chromium_src-ea75b0a85c31090eea5746b34d45add742607af2.tar.bz2 |
Revert 49600 - Http cache: Remove deprecated code.
BUG=26729
TEST=current tests
Review URL: http://codereview.chromium.org/2776007
TBR=rvargas@google.com
Review URL: http://codereview.chromium.org/2779020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49613 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache_unittest.cc')
-rw-r--r-- | net/http/http_cache_unittest.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc index ed2f377..4337d3b 100644 --- a/net/http/http_cache_unittest.cc +++ b/net/http/http_cache_unittest.cc @@ -591,11 +591,7 @@ class MockHttpCache { return static_cast<MockNetworkLayer*>(http_cache_.network_layer()); } MockDiskCache* disk_cache() { - TestCompletionCallback cb; - disk_cache::Backend* backend; - int rv = http_cache_.GetBackend(&backend, &cb); - rv = cb.GetResult(rv); - return (rv == net::OK) ? static_cast<MockDiskCache*>(backend) : NULL; + return static_cast<MockDiskCache*>(http_cache_.GetBackend()); } // Helper function for reading response info from the disk cache. @@ -1022,11 +1018,8 @@ TEST(HttpCache, CreateThenDestroy) { TEST(HttpCache, GetBackend) { MockHttpCache cache(net::HttpCache::DefaultBackend::InMemory(0)); - disk_cache::Backend* backend; - TestCompletionCallback cb; // This will lazily initialize the backend. - int rv = cache.http_cache()->GetBackend(&backend, &cb); - EXPECT_EQ(net::OK, cb.GetResult(rv)); + EXPECT_TRUE(cache.http_cache()->GetBackend()); } TEST(HttpCache, SimpleGET) { @@ -1083,7 +1076,7 @@ TEST(HttpCache, SimpleGETNoDiskCache2) { RunTransactionTest(cache.http_cache(), kSimpleGET_Transaction); EXPECT_EQ(1, cache.network_layer()->transaction_count()); - EXPECT_FALSE(cache.http_cache()->GetCurrentBackend()); + EXPECT_FALSE(cache.http_cache()->GetBackend()); } TEST(HttpCache, SimpleGETWithDiskFailures) { |