diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-11 17:36:07 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-11 17:36:07 +0000 |
commit | 7567484144da059e2c2c2a818b06660a5459052f (patch) | |
tree | a4ceafc7e890051c25dbdd54b170d0f5794dd229 /chrome/browser/chromeos/drive | |
parent | 8a25d54d6eb190a8b82479b5309a892c1080a372 (diff) | |
download | chromium_src-7567484144da059e2c2c2a818b06660a5459052f.zip chromium_src-7567484144da059e2c2c2a818b06660a5459052f.tar.gz chromium_src-7567484144da059e2c2c2a818b06660a5459052f.tar.bz2 |
Move PathExists to base namespace.
BUG=
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/18286004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211147 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/drive')
8 files changed, 26 insertions, 26 deletions
diff --git a/chrome/browser/chromeos/drive/fake_file_system.cc b/chrome/browser/chromeos/drive/fake_file_system.cc index 54c12b8..ba8e419 100644 --- a/chrome/browser/chromeos/drive/fake_file_system.cc +++ b/chrome/browser/chromeos/drive/fake_file_system.cc @@ -296,7 +296,7 @@ void FakeFileSystem::GetFileContentByPathAfterGetWapiResourceEntry( base::FilePath cache_path = cache_dir_.path().AppendASCII(entry->resource_id()); - if (file_util::PathExists(cache_path)) { + if (base::PathExists(cache_path)) { // Cache file is found. initialized_callback.Run(FILE_ERROR_OK, entry.Pass(), cache_path, base::Closure()); diff --git a/chrome/browser/chromeos/drive/file_cache.cc b/chrome/browser/chromeos/drive/file_cache.cc index 0a18c54..a99f565 100644 --- a/chrome/browser/chromeos/drive/file_cache.cc +++ b/chrome/browser/chromeos/drive/file_cache.cc @@ -688,7 +688,7 @@ bool FileCache::HasEnoughSpaceFor(int64 num_bytes, } bool FileCache::ImportOldDB(const base::FilePath& old_db_path) { - if (!file_util::PathExists(old_db_path)) // Old DB is not there, do nothing. + if (!base::PathExists(old_db_path)) // Old DB is not there, do nothing. return false; // Copy all entries stored in the old DB. diff --git a/chrome/browser/chromeos/drive/file_cache_metadata.cc b/chrome/browser/chromeos/drive/file_cache_metadata.cc index b421b43..7d6c662 100644 --- a/chrome/browser/chromeos/drive/file_cache_metadata.cc +++ b/chrome/browser/chromeos/drive/file_cache_metadata.cc @@ -95,7 +95,7 @@ FileCacheMetadata::InitializeResult FileCacheMetadata::Initialize( const base::FilePath& db_path) { AssertOnSequencedWorkerPool(); - bool created = !file_util::PathExists(db_path); + bool created = !base::PathExists(db_path); leveldb::DB* level_db = NULL; leveldb::Options options; diff --git a/chrome/browser/chromeos/drive/file_cache_unittest.cc b/chrome/browser/chromeos/drive/file_cache_unittest.cc index 560d579..4b68555 100644 --- a/chrome/browser/chromeos/drive/file_cache_unittest.cc +++ b/chrome/browser/chromeos/drive/file_cache_unittest.cc @@ -167,7 +167,7 @@ class FileCacheTestOnUIThread : public testing::Test { EXPECT_EQ(FILE_ERROR_OK, error); const base::FilePath path = cache_->GetCacheFilePath(resource_id); - EXPECT_FALSE(file_util::PathExists(path)); + EXPECT_FALSE(base::PathExists(path)); } } @@ -267,7 +267,7 @@ class FileCacheTestOnUIThread : public testing::Test { &error, &cache_file_path)); test_util::RunBlockingPoolTask(); - EXPECT_TRUE(file_util::PathExists(cache_file_path)); + EXPECT_TRUE(base::PathExists(cache_file_path)); EXPECT_EQ(cache_file_path, cache_->GetCacheFilePath(resource_id)); } @@ -293,7 +293,7 @@ class FileCacheTestOnUIThread : public testing::Test { test_util::RunBlockingPoolTask(); EXPECT_EQ(FILE_ERROR_OK, error); - EXPECT_TRUE(file_util::PathExists(cache_file_path)); + EXPECT_TRUE(base::PathExists(cache_file_path)); EXPECT_EQ(cache_file_path, cache_->GetCacheFilePath(resource_id)); } @@ -322,7 +322,7 @@ class FileCacheTestOnUIThread : public testing::Test { // Verify actual cache file. base::FilePath dest_path = cache_->GetCacheFilePath(resource_id); EXPECT_EQ((expected_cache_state_ & TEST_CACHE_STATE_PRESENT) != 0, - file_util::PathExists(dest_path)); + base::PathExists(dest_path)); } // Helper function to call GetCacheEntry from origin thread. @@ -600,7 +600,7 @@ TEST_F(FileCacheTestOnUIThread, PinAndUnpinDirtyCache) { google_apis::test_util::CreateCopyResultCallback(&error, &dirty_path)); test_util::RunBlockingPoolTask(); EXPECT_EQ(FILE_ERROR_OK, error); - EXPECT_TRUE(file_util::PathExists(dirty_path)); + EXPECT_TRUE(base::PathExists(dirty_path)); // Pin the dirty file. TestPin(resource_id, FILE_ERROR_OK, @@ -609,14 +609,14 @@ TEST_F(FileCacheTestOnUIThread, PinAndUnpinDirtyCache) { TEST_CACHE_STATE_PINNED); // Verify dirty file still exist at the same pathname. - EXPECT_TRUE(file_util::PathExists(dirty_path)); + EXPECT_TRUE(base::PathExists(dirty_path)); // Unpin the dirty file. TestUnpin(resource_id, FILE_ERROR_OK, TEST_CACHE_STATE_PRESENT | TEST_CACHE_STATE_DIRTY); // Verify dirty file still exist at the same pathname. - EXPECT_TRUE(file_util::PathExists(dirty_path)); + EXPECT_TRUE(base::PathExists(dirty_path)); } TEST_F(FileCacheTestOnUIThread, DirtyCacheRepetitive) { @@ -918,10 +918,10 @@ TEST_F(FileCacheTest, FreeDiskSpaceIfNeededFor) { // Only 'temporary' file gets removed. FileCacheEntry entry; EXPECT_FALSE(cache_->GetCacheEntry(resource_id_tmp, md5_tmp, &entry)); - EXPECT_FALSE(file_util::PathExists(tmp_path)); + EXPECT_FALSE(base::PathExists(tmp_path)); EXPECT_TRUE(cache_->GetCacheEntry(resource_id_pinned, md5_pinned, &entry)); - EXPECT_TRUE(file_util::PathExists(pinned_path)); + EXPECT_TRUE(base::PathExists(pinned_path)); // Returns false when disk space cannot be freed. fake_free_disk_space_getter_->set_default_value(0); @@ -948,13 +948,13 @@ TEST_F(FileCacheTest, ImportOldDB) { entry.set_md5(md5_2); old_metadata.AddOrUpdateCacheEntry(key2, entry); } - EXPECT_TRUE(file_util::PathExists(old_db_path)); + EXPECT_TRUE(base::PathExists(old_db_path)); // Do import. EXPECT_TRUE(ImportOldDB(cache_.get(), old_db_path)); // Old DB should be removed. - EXPECT_FALSE(file_util::PathExists(old_db_path)); + EXPECT_FALSE(base::PathExists(old_db_path)); // Data is imported correctly. FileCacheEntry entry; diff --git a/chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc b/chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc index 83056ff..4e22efe 100644 --- a/chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc +++ b/chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc @@ -48,7 +48,7 @@ TEST_F(OpenFileOperationTest, OpenExistingFile) { test_util::RunBlockingPoolTask(); EXPECT_EQ(FILE_ERROR_OK, error); - ASSERT_TRUE(file_util::PathExists(file_path)); + ASSERT_TRUE(base::PathExists(file_path)); int64 local_file_size; ASSERT_TRUE(file_util::GetFileSize(file_path, &local_file_size)); EXPECT_EQ(file_size, local_file_size); @@ -107,7 +107,7 @@ TEST_F(OpenFileOperationTest, CreateNonExistingFile) { test_util::RunBlockingPoolTask(); EXPECT_EQ(FILE_ERROR_OK, error); - ASSERT_TRUE(file_util::PathExists(file_path)); + ASSERT_TRUE(base::PathExists(file_path)); int64 local_file_size; ASSERT_TRUE(file_util::GetFileSize(file_path, &local_file_size)); EXPECT_EQ(0, local_file_size); // Should be an empty file. @@ -132,7 +132,7 @@ TEST_F(OpenFileOperationTest, OpenOrCreateExistingFile) { test_util::RunBlockingPoolTask(); EXPECT_EQ(FILE_ERROR_OK, error); - ASSERT_TRUE(file_util::PathExists(file_path)); + ASSERT_TRUE(base::PathExists(file_path)); int64 local_file_size; ASSERT_TRUE(file_util::GetFileSize(file_path, &local_file_size)); EXPECT_EQ(file_size, local_file_size); @@ -154,7 +154,7 @@ TEST_F(OpenFileOperationTest, OpenOrCreateNonExistingFile) { test_util::RunBlockingPoolTask(); EXPECT_EQ(FILE_ERROR_OK, error); - ASSERT_TRUE(file_util::PathExists(file_path)); + ASSERT_TRUE(base::PathExists(file_path)); int64 local_file_size; ASSERT_TRUE(file_util::GetFileSize(file_path, &local_file_size)); EXPECT_EQ(0, local_file_size); // Should be an empty file. @@ -179,7 +179,7 @@ TEST_F(OpenFileOperationTest, OpenFileTwice) { test_util::RunBlockingPoolTask(); EXPECT_EQ(FILE_ERROR_OK, error); - ASSERT_TRUE(file_util::PathExists(file_path)); + ASSERT_TRUE(base::PathExists(file_path)); int64 local_file_size; ASSERT_TRUE(file_util::GetFileSize(file_path, &local_file_size)); EXPECT_EQ(file_size, local_file_size); @@ -196,7 +196,7 @@ TEST_F(OpenFileOperationTest, OpenFileTwice) { test_util::RunBlockingPoolTask(); EXPECT_EQ(FILE_ERROR_OK, error); - ASSERT_TRUE(file_util::PathExists(file_path)); + ASSERT_TRUE(base::PathExists(file_path)); ASSERT_TRUE(file_util::GetFileSize(file_path, &local_file_size)); EXPECT_EQ(file_size, local_file_size); diff --git a/chrome/browser/chromeos/drive/file_system_util.cc b/chrome/browser/chromeos/drive/file_system_util.cc index fc79abc..1907bab 100644 --- a/chrome/browser/chromeos/drive/file_system_util.cc +++ b/chrome/browser/chromeos/drive/file_system_util.cc @@ -122,7 +122,7 @@ void MoveAllFilesFromDirectory(const base::FilePath& directory_from, for (base::FilePath file_from = enumerator.Next(); !file_from.empty(); file_from = enumerator.Next()) { const base::FilePath file_to = directory_to.Append(file_from.BaseName()); - if (!file_util::PathExists(file_to)) // Do not overwrite existing files. + if (!base::PathExists(file_to)) // Do not overwrite existing files. base::Move(file_from, file_to); } } @@ -315,7 +315,7 @@ void MigrateCacheFilesFromOldDirectories( cache_root_directory.AppendASCII("persistent"); const base::FilePath tmp_directory = cache_root_directory.AppendASCII("tmp"); - if (!file_util::PathExists(persistent_directory)) + if (!base::PathExists(persistent_directory)) return; const base::FilePath cache_file_directory = diff --git a/chrome/browser/chromeos/drive/file_system_util_unittest.cc b/chrome/browser/chromeos/drive/file_system_util_unittest.cc index de912a5..9355866 100644 --- a/chrome/browser/chromeos/drive/file_system_util_unittest.cc +++ b/chrome/browser/chromeos/drive/file_system_util_unittest.cc @@ -206,9 +206,9 @@ TEST(FileSystemUtilTest, MigrateCacheFilesFromOldDirectories) { // Migrate. MigrateCacheFilesFromOldDirectories(temp_dir.path()); - EXPECT_FALSE(file_util::PathExists(persistent_directory)); - EXPECT_TRUE(file_util::PathExists(files_directory.AppendASCII("foo.abc"))); - EXPECT_TRUE(file_util::PathExists(files_directory.AppendASCII("bar.123"))); + EXPECT_FALSE(base::PathExists(persistent_directory)); + EXPECT_TRUE(base::PathExists(files_directory.AppendASCII("foo.abc"))); + EXPECT_TRUE(base::PathExists(files_directory.AppendASCII("bar.123"))); } TEST(FileSystemUtilTest, NeedsNamespaceMigration) { diff --git a/chrome/browser/chromeos/drive/resource_metadata_storage.cc b/chrome/browser/chromeos/drive/resource_metadata_storage.cc index b7a6264..8dc0fbc 100644 --- a/chrome/browser/chromeos/drive/resource_metadata_storage.cc +++ b/chrome/browser/chromeos/drive/resource_metadata_storage.cc @@ -230,7 +230,7 @@ bool ResourceMetadataStorage::Initialize() { options.create_if_missing = false; DBInitStatus open_existing_result = DB_INIT_NOT_FOUND; - if (file_util::PathExists(resource_map_path)) { + if (base::PathExists(resource_map_path)) { leveldb::Status status = leveldb::DB::Open(options, resource_map_path.AsUTF8Unsafe(), &db); open_existing_result = LevelDBStatusToDBInitStatus(status); |