| Index: net/disk_cache/disk_cache_test_util.cc
|
| diff --git a/net/disk_cache/disk_cache_test_util.cc b/net/disk_cache/disk_cache_test_util.cc
|
| index 2b23ee4d8bfad701e5d9f5141168afcf8b193579..9d36c13b8061c1ae4288190aef41e1a8cd6c12c5 100644
|
| --- a/net/disk_cache/disk_cache_test_util.cc
|
| +++ b/net/disk_cache/disk_cache_test_util.cc
|
| @@ -46,12 +46,11 @@ bool CreateCacheTestFile(const base::FilePath& name) {
|
| base::PLATFORM_FILE_READ |
|
| base::PLATFORM_FILE_WRITE;
|
|
|
| - scoped_refptr<disk_cache::File> file(new disk_cache::File(
|
| - base::CreatePlatformFile(name, flags, NULL, NULL)));
|
| - if (!file->IsValid())
|
| + base::PlatformFile file = base::CreatePlatformFile(name, flags, NULL, NULL);
|
| + if (file == base::kInvalidPlatformFileValue)
|
| return false;
|
|
|
| - file->SetLength(4 * 1024 * 1024);
|
| + base::TruncatePlatformFile(file, 4 * 1024 * 1024);
|
| return true;
|
| }
|
|
|
| @@ -60,20 +59,6 @@ bool DeleteCache(const base::FilePath& path) {
|
| return true;
|
| }
|
|
|
| -bool CheckCacheIntegrity(const base::FilePath& path, bool new_eviction,
|
| - uint32 mask) {
|
| - scoped_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(
|
| - path, mask, base::MessageLoopProxy::current().get(), NULL));
|
| - if (!cache.get())
|
| - return false;
|
| - if (new_eviction)
|
| - cache->SetNewEviction();
|
| - cache->SetFlags(disk_cache::kNoRandom);
|
| - if (cache->SyncInit() != net::OK)
|
| - return false;
|
| - return cache->SelfCheck() >= 0;
|
| -}
|
| -
|
| // -----------------------------------------------------------------------
|
|
|
| MessageLoopHelper::MessageLoopHelper()
|
|
|