summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
diff options
context:
space:
mode:
Diffstat (limited to 'net/disk_cache')
-rw-r--r--net/disk_cache/backend_unittest.cc4
-rw-r--r--net/disk_cache/cache_util.cc2
-rw-r--r--net/disk_cache/cache_util_unittest.cc34
-rw-r--r--net/disk_cache/simple/simple_backend_impl.cc2
-rw-r--r--net/disk_cache/simple/simple_index_file.cc2
-rw-r--r--net/disk_cache/simple/simple_index_file_unittest.cc6
6 files changed, 25 insertions, 25 deletions
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index 5a61ca3..47e80d0 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -2950,7 +2950,7 @@ TEST_F(DiskCacheBackendTest, SimpleCacheOpenMissingFile) {
// Delete one of the files in the entry.
base::FilePath to_delete_file = cache_path_.AppendASCII(
disk_cache::simple_util::GetFilenameFromKeyAndIndex(key, 0));
- EXPECT_TRUE(file_util::PathExists(to_delete_file));
+ EXPECT_TRUE(base::PathExists(to_delete_file));
EXPECT_TRUE(disk_cache::DeleteCacheFile(to_delete_file));
// Failing to open the entry should delete the rest of these files.
@@ -2961,7 +2961,7 @@ TEST_F(DiskCacheBackendTest, SimpleCacheOpenMissingFile) {
base::FilePath
should_be_gone_file(cache_path_.AppendASCII(
disk_cache::simple_util::GetFilenameFromKeyAndIndex(key, i)));
- EXPECT_FALSE(file_util::PathExists(should_be_gone_file));
+ EXPECT_FALSE(base::PathExists(should_be_gone_file));
}
}
diff --git a/net/disk_cache/cache_util.cc b/net/disk_cache/cache_util.cc
index 0504559..2457553 100644
--- a/net/disk_cache/cache_util.cc
+++ b/net/disk_cache/cache_util.cc
@@ -41,7 +41,7 @@ base::FilePath GetTempCacheName(const base::FilePath& path,
// We'll attempt to have up to kMaxOldFolders folders for deletion.
for (int i = 0; i < kMaxOldFolders; i++) {
base::FilePath to_delete = GetPrefixedName(path, name, i);
- if (!file_util::PathExists(to_delete))
+ if (!base::PathExists(to_delete))
return to_delete;
}
return base::FilePath();
diff --git a/net/disk_cache/cache_util_unittest.cc b/net/disk_cache/cache_util_unittest.cc
index 74ae365..aebd268 100644
--- a/net/disk_cache/cache_util_unittest.cc
+++ b/net/disk_cache/cache_util_unittest.cc
@@ -48,18 +48,18 @@ class CacheUtilTest : public PlatformTest {
TEST_F(CacheUtilTest, MoveCache) {
EXPECT_TRUE(disk_cache::MoveCache(cache_dir_, dest_dir_));
- EXPECT_TRUE(file_util::PathExists(dest_dir_));
- EXPECT_TRUE(file_util::PathExists(dest_file1_));
- EXPECT_TRUE(file_util::PathExists(dest_file2_));
- EXPECT_TRUE(file_util::PathExists(dest_dir1_));
+ EXPECT_TRUE(base::PathExists(dest_dir_));
+ EXPECT_TRUE(base::PathExists(dest_file1_));
+ EXPECT_TRUE(base::PathExists(dest_file2_));
+ EXPECT_TRUE(base::PathExists(dest_dir1_));
#if defined(OS_CHROMEOS)
- EXPECT_TRUE(file_util::PathExists(cache_dir_)); // old cache dir stays
+ EXPECT_TRUE(base::PathExists(cache_dir_)); // old cache dir stays
#else
- EXPECT_FALSE(file_util::PathExists(cache_dir_)); // old cache is gone
+ EXPECT_FALSE(base::PathExists(cache_dir_)); // old cache is gone
#endif
- EXPECT_FALSE(file_util::PathExists(file1_));
- EXPECT_FALSE(file_util::PathExists(file2_));
- EXPECT_FALSE(file_util::PathExists(dir1_));
+ EXPECT_FALSE(base::PathExists(file1_));
+ EXPECT_FALSE(base::PathExists(file2_));
+ EXPECT_FALSE(base::PathExists(dir1_));
}
TEST_F(CacheUtilTest, DeleteCache) {
@@ -67,9 +67,9 @@ TEST_F(CacheUtilTest, DeleteCache) {
// one around.
base::Delete(dir1_, false);
disk_cache::DeleteCache(cache_dir_, false);
- EXPECT_TRUE(file_util::PathExists(cache_dir_)); // cache dir stays
- EXPECT_FALSE(file_util::PathExists(file1_));
- EXPECT_FALSE(file_util::PathExists(file2_));
+ EXPECT_TRUE(base::PathExists(cache_dir_)); // cache dir stays
+ EXPECT_FALSE(base::PathExists(file1_));
+ EXPECT_FALSE(base::PathExists(file2_));
}
TEST_F(CacheUtilTest, DeleteCacheAndDir) {
@@ -77,15 +77,15 @@ TEST_F(CacheUtilTest, DeleteCacheAndDir) {
// one around.
base::Delete(dir1_, false);
disk_cache::DeleteCache(cache_dir_, true);
- EXPECT_FALSE(file_util::PathExists(cache_dir_)); // cache dir is gone
- EXPECT_FALSE(file_util::PathExists(file1_));
- EXPECT_FALSE(file_util::PathExists(file2_));
+ EXPECT_FALSE(base::PathExists(cache_dir_)); // cache dir is gone
+ EXPECT_FALSE(base::PathExists(file1_));
+ EXPECT_FALSE(base::PathExists(file2_));
}
TEST_F(CacheUtilTest, DeleteCacheFile) {
EXPECT_TRUE(disk_cache::DeleteCacheFile(file1_));
- EXPECT_FALSE(file_util::PathExists(file1_));
- EXPECT_TRUE(file_util::PathExists(cache_dir_)); // cache dir stays
+ EXPECT_FALSE(base::PathExists(file1_));
+ EXPECT_TRUE(base::PathExists(cache_dir_)); // cache dir stays
}
} // namespace disk_cache
diff --git a/net/disk_cache/simple/simple_backend_impl.cc b/net/disk_cache/simple/simple_backend_impl.cc
index 16c77ed..1302054 100644
--- a/net/disk_cache/simple/simple_backend_impl.cc
+++ b/net/disk_cache/simple/simple_backend_impl.cc
@@ -94,7 +94,7 @@ void DeleteBackendImpl(disk_cache::Backend** backend,
// 2. The Simple Backend has pickled file format for the index making it hacky
// to have the magic in the right place.
bool FileStructureConsistent(const base::FilePath& path) {
- if (!file_util::PathExists(path) && !file_util::CreateDirectory(path)) {
+ if (!base::PathExists(path) && !file_util::CreateDirectory(path)) {
LOG(ERROR) << "Failed to create directory: " << path.LossyDisplayName();
return false;
}
diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc
index 067e9c6..e154553 100644
--- a/net/disk_cache/simple/simple_index_file.cc
+++ b/net/disk_cache/simple/simple_index_file.cc
@@ -165,7 +165,7 @@ void SimpleIndexFile::SyncLoadIndexEntries(
// TODO(felipeg): probably could load a stale index and use it for something.
scoped_ptr<SimpleIndex::EntrySet> index_file_entries;
- const bool index_file_exists = file_util::PathExists(index_file_path);
+ const bool index_file_exists = base::PathExists(index_file_path);
// Only load if the index is not stale.
const bool index_stale = IsIndexFileStale(index_file_path);
diff --git a/net/disk_cache/simple/simple_index_file_unittest.cc b/net/disk_cache/simple/simple_index_file_unittest.cc
index 8e5b88d..e2493f9 100644
--- a/net/disk_cache/simple/simple_index_file_unittest.cc
+++ b/net/disk_cache/simple/simple_index_file_unittest.cc
@@ -196,7 +196,7 @@ TEST_F(SimpleIndexFileTest, WriteThenLoadIndex) {
simple_index_file.WriteToDisk(entries, kCacheSize,
base::TimeTicks(), false);
base::RunLoop().RunUntilIdle();
- EXPECT_TRUE(file_util::PathExists(index_path));
+ EXPECT_TRUE(base::PathExists(index_path));
}
WrappedSimpleIndexFile simple_index_file(temp_dir.path());
@@ -204,7 +204,7 @@ TEST_F(SimpleIndexFileTest, WriteThenLoadIndex) {
GetCallback());
base::RunLoop().RunUntilIdle();
- EXPECT_TRUE(file_util::PathExists(index_path));
+ EXPECT_TRUE(base::PathExists(index_path));
ASSERT_TRUE(callback_result());
EXPECT_FALSE(callback_result()->force_index_flush);
const SimpleIndex::EntrySet* read_entries =
@@ -235,7 +235,7 @@ TEST_F(SimpleIndexFileTest, LoadCorruptIndex) {
GetCallback());
base::RunLoop().RunUntilIdle();
- EXPECT_FALSE(file_util::PathExists(index_path));
+ EXPECT_FALSE(base::PathExists(index_path));
ASSERT_TRUE(callback_result());
EXPECT_TRUE(callback_result()->force_index_flush);
EXPECT_TRUE(callback_result()->index_file_entries);