summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-11 17:36:07 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-11 17:36:07 +0000
commit7567484144da059e2c2c2a818b06660a5459052f (patch)
treea4ceafc7e890051c25dbdd54b170d0f5794dd229 /chrome/browser
parent8a25d54d6eb190a8b82479b5309a892c1080a372 (diff)
downloadchromium_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')
-rw-r--r--chrome/browser/bookmarks/bookmark_codec_unittest.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_storage.cc2
-rw-r--r--chrome/browser/chrome_browser_main.cc2
-rw-r--r--chrome/browser/chrome_plugin_browsertest.cc2
-rw-r--r--chrome/browser/chromeos/app_mode/kiosk_app_data.cc2
-rw-r--r--chrome/browser/chromeos/boot_times_loader.cc6
-rw-r--r--chrome/browser/chromeos/drive/fake_file_system.cc2
-rw-r--r--chrome/browser/chromeos/drive/file_cache.cc2
-rw-r--r--chrome/browser/chromeos/drive/file_cache_metadata.cc2
-rw-r--r--chrome/browser/chromeos/drive/file_cache_unittest.cc22
-rw-r--r--chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc12
-rw-r--r--chrome/browser/chromeos/drive/file_system_util.cc4
-rw-r--r--chrome/browser/chromeos/drive/file_system_util_unittest.cc6
-rw-r--r--chrome/browser/chromeos/drive/resource_metadata_storage.cc2
-rw-r--r--chrome/browser/chromeos/enterprise_extension_observer.cc2
-rw-r--r--chrome/browser/chromeos/extensions/default_app_order.cc2
-rw-r--r--chrome/browser/chromeos/extensions/default_app_order_unittest.cc2
-rw-r--r--chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc4
-rw-r--r--chrome/browser/chromeos/extensions/file_manager/file_handler_util.cc2
-rw-r--r--chrome/browser/chromeos/extensions/wallpaper_private_api.cc12
-rw-r--r--chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc4
-rw-r--r--chrome/browser/chromeos/login/login_utils.cc2
-rw-r--r--chrome/browser/chromeos/login/startup_utils.cc4
-rw-r--r--chrome/browser/chromeos/login/wallpaper_manager.cc32
-rw-r--r--chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc4
-rw-r--r--chrome/browser/chromeos/mobile/mobile_activator.cc2
-rw-r--r--chrome/browser/chromeos/policy/app_pack_updater.cc2
-rw-r--r--chrome/browser/chromeos/policy/enterprise_install_attributes.cc2
-rw-r--r--chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc4
-rw-r--r--chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc4
-rw-r--r--chrome/browser/chromeos/policy/user_policy_disk_cache.cc2
-rw-r--r--chrome/browser/chromeos/policy/user_policy_token_loader.cc2
-rw-r--r--chrome/browser/chromeos/settings/owner_key_util.cc2
-rw-r--r--chrome/browser/chromeos/system/input_device_settings.cc2
-rw-r--r--chrome/browser/chromeos/system/timezone_settings.cc2
-rw-r--r--chrome/browser/component_updater/component_patcher.cc2
-rw-r--r--chrome/browser/component_updater/component_patcher_win.cc4
-rw-r--r--chrome/browser/component_updater/component_unpacker.cc4
-rw-r--r--chrome/browser/component_updater/pepper_flash_component_installer.cc8
-rw-r--r--chrome/browser/component_updater/pnacl/pnacl_component_installer.cc8
-rw-r--r--chrome/browser/component_updater/recovery_component_installer.cc2
-rw-r--r--chrome/browser/component_updater/swiftshader_component_installer.cc12
-rw-r--r--chrome/browser/component_updater/test/component_installers_unittest.cc2
-rw-r--r--chrome/browser/component_updater/widevine_cdm_component_installer.cc12
-rw-r--r--chrome/browser/content_settings/content_settings_browsertest.cc2
-rw-r--r--chrome/browser/diagnostics/recon_diagnostics.cc4
-rw-r--r--chrome/browser/diagnostics/sqlite_diagnostics.cc2
-rw-r--r--chrome/browser/download/chrome_download_manager_delegate.cc2
-rw-r--r--chrome/browser/download/download_browsertest.cc28
-rw-r--r--chrome/browser/download/download_path_reservation_tracker.cc2
-rw-r--r--chrome/browser/download/save_page_browsertest.cc32
-rw-r--r--chrome/browser/extensions/api/downloads/downloads_api_unittest.cc4
-rw-r--r--chrome/browser/extensions/api/file_system/file_system_api.cc2
-rw-r--r--chrome/browser/extensions/api/page_capture/page_capture_apitest.cc2
-rw-r--r--chrome/browser/extensions/api/record/record_api.cc4
-rw-r--r--chrome/browser/extensions/api/storage/settings_frontend_unittest.cc6
-rw-r--r--chrome/browser/extensions/api/storage/storage_schema_manifest_handler.cc2
-rw-r--r--chrome/browser/extensions/convert_user_script_unittest.cc10
-rw-r--r--chrome/browser/extensions/convert_web_app_unittest.cc2
-rw-r--r--chrome/browser/extensions/extension_browsertest.cc8
-rw-r--r--chrome/browser/extensions/extension_creator.cc10
-rw-r--r--chrome/browser/extensions/extension_protocols.cc2
-rw-r--r--chrome/browser/extensions/extension_service_unittest.cc98
-rw-r--r--chrome/browser/extensions/external_pref_loader.cc4
-rw-r--r--chrome/browser/extensions/external_registry_loader_win.cc2
-rw-r--r--chrome/browser/extensions/platform_app_launcher.cc2
-rw-r--r--chrome/browser/extensions/sandboxed_unpacker_unittest.cc6
-rw-r--r--chrome/browser/extensions/test_extension_dir.cc4
-rw-r--r--chrome/browser/extensions/user_script_listener_unittest.cc2
-rw-r--r--chrome/browser/first_run/first_run.cc6
-rw-r--r--chrome/browser/first_run/first_run_internal_posix.cc2
-rw-r--r--chrome/browser/first_run/first_run_internal_win.cc2
-rw-r--r--chrome/browser/first_run/first_run_unittest.cc4
-rw-r--r--chrome/browser/first_run/upgrade_util_win.cc4
-rw-r--r--chrome/browser/google/google_update_settings_posix.cc4
-rw-r--r--chrome/browser/history/android/android_provider_backend_unittest.cc12
-rw-r--r--chrome/browser/history/in_memory_url_index_unittest.cc2
-rw-r--r--chrome/browser/history/text_database.cc2
-rw-r--r--chrome/browser/history/top_sites_database.cc2
-rw-r--r--chrome/browser/history/top_sites_impl_unittest.cc2
-rw-r--r--chrome/browser/history/top_sites_likely_impl_unittest.cc2
-rw-r--r--chrome/browser/history/url_index_private_data.cc2
-rw-r--r--chrome/browser/importer/firefox3_importer.cc10
-rw-r--r--chrome/browser/importer/firefox_importer_browsertest.cc2
-rw-r--r--chrome/browser/importer/firefox_importer_utils.cc2
-rw-r--r--chrome/browser/importer/firefox_importer_utils_linux.cc2
-rw-r--r--chrome/browser/importer/firefox_importer_utils_mac.mm2
-rw-r--r--chrome/browser/importer/firefox_importer_utils_win.cc2
-rw-r--r--chrome/browser/importer/firefox_profile_lock_unittest.cc12
-rw-r--r--chrome/browser/importer/safari_importer.mm4
-rw-r--r--chrome/browser/importer/safari_importer_unittest.mm2
-rw-r--r--chrome/browser/jumplist_win.cc2
-rw-r--r--chrome/browser/mac/master_prefs.mm2
-rw-r--r--chrome/browser/media/chrome_webrtc_browsertest.cc2
-rw-r--r--chrome/browser/media/chrome_webrtc_video_quality_browsertest.cc16
-rw-r--r--chrome/browser/media/webrtc_log_uploader.cc2
-rw-r--r--chrome/browser/media_galleries/fileapi/itunes_finder_win.cc4
-rw-r--r--chrome/browser/media_galleries/fileapi/native_media_file_util.cc2
-rw-r--r--chrome/browser/nacl_host/nacl_file_host.cc2
-rw-r--r--chrome/browser/net/net_log_temp_file.cc2
-rw-r--r--chrome/browser/net/net_log_temp_file_unittest.cc8
-rw-r--r--chrome/browser/net/sqlite_server_bound_cert_store.cc2
-rw-r--r--chrome/browser/net/url_fixer_upper.cc2
-rw-r--r--chrome/browser/page_cycler/page_cycler.cc6
-rw-r--r--chrome/browser/page_cycler/page_cycler_browsertest.cc44
-rw-r--r--chrome/browser/page_cycler/page_cycler_unittest.cc6
-rw-r--r--chrome/browser/performance_monitor/performance_monitor_browsertest.cc6
-rw-r--r--chrome/browser/policy/cloud/user_cloud_policy_store.cc2
-rw-r--r--chrome/browser/policy/cloud/user_cloud_policy_store_unittest.cc4
-rw-r--r--chrome/browser/policy/policy_browsertest.cc8
-rw-r--r--chrome/browser/policy/policy_loader_win.cc4
-rw-r--r--chrome/browser/prefs/chrome_pref_service_unittest.cc4
-rw-r--r--chrome/browser/prefs/pref_service_browsertest.cc2
-rw-r--r--chrome/browser/printing/printing_layout_browsertest.cc2
-rw-r--r--chrome/browser/profiles/profile_browsertest.cc2
-rw-r--r--chrome/browser/profiles/profile_impl.cc4
-rw-r--r--chrome/browser/profiles/profile_manager_unittest.cc2
-rw-r--r--chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc88
-rw-r--r--chrome/browser/profiles/profile_shortcut_manager_win.cc6
-rw-r--r--chrome/browser/renderer_host/pepper/device_id_fetcher.cc2
-rw-r--r--chrome/browser/safe_browsing/download_feedback_service_unittest.cc16
-rw-r--r--chrome/browser/safe_browsing/download_feedback_unittest.cc8
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_unittest.cc10
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_store_file.cc12
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc24
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_store_unittest_helper.cc6
-rw-r--r--chrome/browser/search_engines/template_url_fetcher_unittest.cc2
-rw-r--r--chrome/browser/search_engines/template_url_parser_unittest.cc4
-rw-r--r--chrome/browser/sessions/session_backend.cc8
-rw-r--r--chrome/browser/shell_integration.cc2
-rw-r--r--chrome/browser/shell_integration_linux.cc6
-rw-r--r--chrome/browser/shell_integration_win.cc2
-rw-r--r--chrome/browser/spellchecker/spellcheck_custom_dictionary.cc2
-rw-r--r--chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc4
-rw-r--r--chrome/browser/spellchecker/spellcheck_service_browsertest.cc2
-rw-r--r--chrome/browser/storage_monitor/media_storage_util.cc4
-rw-r--r--chrome/browser/sync/profile_sync_service_unittest.cc6
-rw-r--r--chrome/browser/sync/test/integration/sync_extension_helper.cc2
-rw-r--r--chrome/browser/sync/test/integration/sync_test.cc2
-rw-r--r--chrome/browser/ui/app_list/app_list_service_mac.mm2
-rw-r--r--chrome/browser/ui/ash/screenshot_taker_unittest.cc2
-rw-r--r--chrome/browser/ui/metro_pin_tab_helper_win.cc2
-rw-r--r--chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc2
-rw-r--r--chrome/browser/ui/views/app_list/app_list_controller_win.cc2
-rw-r--r--chrome/browser/ui/views/avatar_menu_button_browsertest.cc2
-rw-r--r--chrome/browser/ui/views/extensions/native_app_window_views.cc2
-rw-r--r--chrome/browser/ui/web_applications/web_app_ui.cc4
-rw-r--r--chrome/browser/ui/webui/nacl_ui.cc2
-rw-r--r--chrome/browser/ui/webui/options/advanced_options_utils_x11.cc2
-rw-r--r--chrome/browser/upload_list.cc2
-rw-r--r--chrome/browser/user_data_dir_extractor_win.cc2
-rw-r--r--chrome/browser/user_style_sheet_watcher.cc2
-rw-r--r--chrome/browser/web_applications/web_app_mac.mm6
-rw-r--r--chrome/browser/web_applications/web_app_mac_unittest.mm14
-rw-r--r--chrome/browser/web_applications/web_app_win.cc12
156 files changed, 482 insertions, 482 deletions
diff --git a/chrome/browser/bookmarks/bookmark_codec_unittest.cc b/chrome/browser/bookmarks/bookmark_codec_unittest.cc
index e12d11d..9b98001 100644
--- a/chrome/browser/bookmarks/bookmark_codec_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_codec_unittest.cc
@@ -300,7 +300,7 @@ TEST_F(BookmarkCodecTest, CanDecodeModelWithoutMobileBookmarks) {
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory));
base::FilePath test_file = test_data_directory.AppendASCII(
"bookmarks/model_without_sync.json");
- ASSERT_TRUE(file_util::PathExists(test_file));
+ ASSERT_TRUE(base::PathExists(test_file));
JSONFileValueSerializer serializer(test_file);
scoped_ptr<Value> root(serializer.Deserialize(NULL, NULL));
diff --git a/chrome/browser/bookmarks/bookmark_storage.cc b/chrome/browser/bookmarks/bookmark_storage.cc
index 8e9e3a3..79a8528 100644
--- a/chrome/browser/bookmarks/bookmark_storage.cc
+++ b/chrome/browser/bookmarks/bookmark_storage.cc
@@ -53,7 +53,7 @@ void LoadCallback(const base::FilePath& path,
BookmarkLoadDetails* details) {
startup_metric_utils::ScopedSlowStartupUMA
scoped_timer("Startup.SlowStartupBookmarksLoad");
- bool bookmark_file_exists = file_util::PathExists(path);
+ bool bookmark_file_exists = base::PathExists(path);
if (bookmark_file_exists) {
JSONFileValueSerializer serializer(path);
scoped_ptr<Value> root(serializer.Deserialize(NULL, NULL));
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 8d9bde8..be9d189 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -236,7 +236,7 @@ PrefService* InitializeLocalState(
TRACE_EVENT0("startup", "ChromeBrowserMainParts::InitializeLocalState")
base::FilePath local_state_path;
PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path);
- bool local_state_file_exists = file_util::PathExists(local_state_path);
+ bool local_state_file_exists = base::PathExists(local_state_path);
// Load local state. This includes the application locale so we know which
// locale dll to load. This also causes local state prefs to be registered.
diff --git a/chrome/browser/chrome_plugin_browsertest.cc b/chrome/browser/chrome_plugin_browsertest.cc
index 1ef83fa..d7b76b0 100644
--- a/chrome/browser/chrome_plugin_browsertest.cc
+++ b/chrome/browser/chrome_plugin_browsertest.cc
@@ -78,7 +78,7 @@ class ChromePluginTest : public InProcessBrowserTest {
base::FilePath path;
PathService::Get(content::DIR_TEST_DATA, &path);
path = path.AppendASCII("plugin").AppendASCII(filename);
- CHECK(file_util::PathExists(path));
+ CHECK(base::PathExists(path));
return net::FilePathToFileURL(path);
}
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_data.cc b/chrome/browser/chromeos/app_mode/kiosk_app_data.cc
index 639d07f..7e998cd 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_data.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_data.cc
@@ -52,7 +52,7 @@ void SaveIconToLocalOnBlockingPool(
DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
base::FilePath dir = icon_path.DirName();
- if (!file_util::PathExists(dir))
+ if (!base::PathExists(dir))
CHECK(file_util::CreateDirectory(dir));
CHECK_EQ(static_cast<int>(raw_icon->size()),
diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc
index a9919ae..ead638d 100644
--- a/chrome/browser/chromeos/boot_times_loader.cc
+++ b/chrome/browser/chromeos/boot_times_loader.cc
@@ -198,7 +198,7 @@ static void SendBootTimesToUMA(const BootTimesLoader::BootTimes& boot_times) {
static const base::FilePath::CharType kBootTimesSent[] =
FPL("/tmp/boot-times-sent");
base::FilePath sent(kBootTimesSent);
- if (file_util::PathExists(sent))
+ if (base::PathExists(sent))
return;
UMA_HISTOGRAM_TIMES("BootTime.Total",
@@ -228,7 +228,7 @@ static void SendBootTimesToUMA(const BootTimesLoader::BootTimes& boot_times) {
boot_times.system,
boot_times.chrome);
file_util::WriteFile(sent, boot_times_text.data(), boot_times_text.size());
- DCHECK(file_util::PathExists(sent));
+ DCHECK(base::PathExists(sent));
}
void BootTimesLoader::Backend::GetBootTimesAndRunCallback(
@@ -250,7 +250,7 @@ void BootTimesLoader::Backend::GetBootTimesAndRunCallback(
// Wait until firmware-boot-time file exists by reposting.
base::FilePath log_dir(kLogPath);
base::FilePath log_file = log_dir.Append(kFirmwareBootTime);
- if (!file_util::PathExists(log_file)) {
+ if (!base::PathExists(log_file)) {
BrowserThread::PostDelayedTask(
BrowserThread::FILE,
FROM_HERE,
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);
diff --git a/chrome/browser/chromeos/enterprise_extension_observer.cc b/chrome/browser/chromeos/enterprise_extension_observer.cc
index f34632e..34860e8 100644
--- a/chrome/browser/chromeos/enterprise_extension_observer.cc
+++ b/chrome/browser/chromeos/enterprise_extension_observer.cc
@@ -53,7 +53,7 @@ void EnterpriseExtensionObserver::Observe(
void EnterpriseExtensionObserver::CheckExtensionAndNotifyEntd(
const base::FilePath& path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- if (file_util::PathExists(
+ if (base::PathExists(
path.Append(FILE_PATH_LITERAL("isa-cros-policy")))) {
BrowserThread::PostTask(
BrowserThread::UI,
diff --git a/chrome/browser/chromeos/extensions/default_app_order.cc b/chrome/browser/chromeos/extensions/default_app_order.cc
index 4ffc078..ac88f72 100644
--- a/chrome/browser/chromeos/extensions/default_app_order.cc
+++ b/chrome/browser/chromeos/extensions/default_app_order.cc
@@ -27,7 +27,7 @@ ExternalLoader* loader_instance = NULL;
// if the file does not exist or could not be parsed properly. Caller takes
// ownership of the returned value.
base::ListValue* ReadExternalOrdinalFile(const base::FilePath& path) {
- if (!file_util::PathExists(path))
+ if (!base::PathExists(path))
return NULL;
JSONFileValueSerializer serializer(path);
diff --git a/chrome/browser/chromeos/extensions/default_app_order_unittest.cc b/chrome/browser/chromeos/extensions/default_app_order_unittest.cc
index 7f92499..e89af59 100644
--- a/chrome/browser/chromeos/extensions/default_app_order_unittest.cc
+++ b/chrome/browser/chromeos/extensions/default_app_order_unittest.cc
@@ -100,7 +100,7 @@ TEST_F(DefaultAppOrderTest, NoExternalFile) {
base::FilePath none_existent_file =
scoped_tmp_dir.path().AppendASCII("none_existent_file");
- ASSERT_FALSE(file_util::PathExists(none_existent_file));
+ ASSERT_FALSE(base::PathExists(none_existent_file));
SetExternalFile(none_existent_file);
scoped_ptr<default_app_order::ExternalLoader> loader(
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc b/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc
index 6f827f7..c63e08e 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc
@@ -264,7 +264,7 @@ IN_PROC_BROWSER_TEST_F(FileBrowserHandlerExtensionTest, EndToEnd) {
FileBrowserHandlerExtensionTest::TestSelectFileFunctionFactory));
// Selected path should still not exist.
- ASSERT_FALSE(file_util::PathExists(selected_path));
+ ASSERT_FALSE(base::PathExists(selected_path));
const Extension* extension = LoadExtension(
test_data_dir_.AppendASCII("file_browser/filehandler_create"));
@@ -281,7 +281,7 @@ IN_PROC_BROWSER_TEST_F(FileBrowserHandlerExtensionTest, EndToEnd) {
// Selected path should have been created by the test extension after the
// extension function call.
- ASSERT_TRUE(file_util::PathExists(selected_path));
+ ASSERT_TRUE(base::PathExists(selected_path));
// Let's check that the file has the expected content.
const std::string expected_contents = "hello from test extension.";
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_handler_util.cc b/chrome/browser/chromeos/extensions/file_manager/file_handler_util.cc
index 3e88f65..c72c1cd 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_handler_util.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/file_handler_util.cc
@@ -607,7 +607,7 @@ ExtensionTaskExecutor::SetupFileAccessPermissions(
// If the file is under drive mount point, there is no actual file to be
// found on the url.path().
if (!is_drive_file) {
- if (!file_util::PathExists(local_path) ||
+ if (!base::PathExists(local_path) ||
file_util::IsLink(local_path) ||
!file_util::GetFileInfo(local_path, &file_info)) {
continue;
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
index cb4acbb..c1c3000 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
@@ -83,7 +83,7 @@ bool SaveData(int key, const std::string& file_name, const std::string& data) {
}
base::FilePath file_path = data_dir.Append(file_name);
- return file_util::PathExists(file_path) ||
+ return base::PathExists(file_path) ||
(file_util::WriteFile(file_path, data.c_str(),
data.size()) != -1);
}
@@ -98,7 +98,7 @@ bool GetData(const base::FilePath& path, std::string* data) {
!file_util::CreateDirectory(data_dir))
return false;
- return !file_util::PathExists(path) ||
+ return !base::PathExists(path) ||
file_util::ReadFileToString(path, data);
}
@@ -382,10 +382,10 @@ void WallpaperPrivateSetWallpaperIfExistsFunction::
std::string data;
base::FilePath path = file_path;
- if (!file_util::PathExists(file_path))
+ if (!base::PathExists(file_path))
path = fallback_path;
- if (file_util::PathExists(path) &&
+ if (base::PathExists(path) &&
file_util::ReadFileToString(path, &data)) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&WallpaperPrivateSetWallpaperIfExistsFunction::StartDecode,
@@ -492,7 +492,7 @@ void WallpaperPrivateSetWallpaperFunction::SaveToFile() {
CHECK(PathService::Get(chrome::DIR_CHROMEOS_WALLPAPERS, &wallpaper_dir));
base::FilePath file_path = wallpaper_dir.Append(
file_name).InsertBeforeExtension(chromeos::kSmallWallpaperSuffix);
- if (file_util::PathExists(file_path))
+ if (base::PathExists(file_path))
return;
// Generates and saves small resolution wallpaper. Uses CENTER_CROPPED to
// maintain the aspect ratio after resize.
@@ -628,7 +628,7 @@ void WallpaperPrivateSetCustomWallpaperFunction::GenerateThumbnail(
DCHECK(BrowserThread::GetBlockingPool()->IsRunningSequenceOnCurrentThread(
sequence_token_));
chromeos::UserImage wallpaper(*image.get());
- if (!file_util::PathExists(thumbnail_path.DirName()))
+ if (!base::PathExists(thumbnail_path.DirName()))
file_util::CreateDirectory(thumbnail_path.DirName());
scoped_refptr<base::RefCountedBytes> data;
diff --git a/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc b/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc
index f2c0292..12c633f 100644
--- a/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc
+++ b/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc
@@ -240,8 +240,8 @@ void ComponentExtensionIMEManagerImpl::ReadComponentExtensionsInfo(
const base::FilePath manifest_path =
component_ime.path.Append("manifest.json");
- if (!file_util::PathExists(component_ime.path) ||
- !file_util::PathExists(manifest_path))
+ if (!base::PathExists(component_ime.path) ||
+ !base::PathExists(manifest_path))
continue;
if (!file_util::ReadFileToString(manifest_path, &component_ime.manifest))
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 8285a53..40bf44d 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -549,7 +549,7 @@ void LoginUtilsImpl::InitRlzDelayed(Profile* user_profile) {
base::PostTaskAndReplyWithResult(
base::WorkerPool::GetTaskRunner(false),
FROM_HERE,
- base::Bind(&file_util::PathExists, GetRlzDisabledFlagPath()),
+ base::Bind(&base::PathExists, GetRlzDisabledFlagPath()),
base::Bind(&LoginUtilsImpl::InitRlz, AsWeakPtr(), user_profile));
#endif
}
diff --git a/chrome/browser/chromeos/login/startup_utils.cc b/chrome/browser/chromeos/login/startup_utils.cc
index a46615a..73fd8a6 100644
--- a/chrome/browser/chromeos/login/startup_utils.cc
+++ b/chrome/browser/chromeos/login/startup_utils.cc
@@ -107,7 +107,7 @@ static base::FilePath GetOobeCompleteFlagPath() {
static void CreateOobeCompleteFlagFile() {
// Create flag file for boot-time init scripts.
base::FilePath oobe_complete_path = GetOobeCompleteFlagPath();
- if (!file_util::PathExists(oobe_complete_path)) {
+ if (!base::PathExists(oobe_complete_path)) {
FILE* oobe_flag_file = file_util::OpenFile(oobe_complete_path, "w+b");
if (oobe_flag_file == NULL)
DLOG(WARNING) << oobe_complete_path.value() << " doesn't exist.";
@@ -133,7 +133,7 @@ bool StartupUtils::IsDeviceRegistered() {
// IO on UI thread. But it's required for update from old versions.
base::ThreadRestrictions::ScopedAllowIO allow_io;
base::FilePath oobe_complete_flag_file_path = GetOobeCompleteFlagPath();
- bool file_exists = file_util::PathExists(oobe_complete_flag_file_path);
+ bool file_exists = base::PathExists(oobe_complete_flag_file_path);
SaveIntegerPreferenceForced(kDeviceRegistered, file_exists ? 1 : 0);
return file_exists;
}
diff --git a/chrome/browser/chromeos/login/wallpaper_manager.cc b/chrome/browser/chromeos/login/wallpaper_manager.cc
index 8be01de..e7bbf72 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager.cc
+++ b/chrome/browser/chromeos/login/wallpaper_manager.cc
@@ -393,7 +393,7 @@ void WallpaperManager::ResizeAndSaveWallpaper(const UserImage& wallpaper,
int preferred_height) {
if (layout == ash::WALLPAPER_LAYOUT_CENTER) {
// TODO(bshe): Generates cropped custom wallpaper for CENTER layout.
- if (file_util::PathExists(path))
+ if (base::PathExists(path))
base::Delete(path, false);
return;
}
@@ -731,16 +731,16 @@ void WallpaperManager::EnsureCustomWallpaperDirectories(
const std::string& email) {
base::FilePath dir;
dir = GetCustomWallpaperDir(kSmallWallpaperSubDir, email);
- if (!file_util::PathExists(dir))
+ if (!base::PathExists(dir))
file_util::CreateDirectory(dir);
dir = GetCustomWallpaperDir(kLargeWallpaperSubDir, email);
- if (!file_util::PathExists(dir))
+ if (!base::PathExists(dir))
file_util::CreateDirectory(dir);
dir = GetCustomWallpaperDir(kOriginalWallpaperSubDir, email);
- if (!file_util::PathExists(dir))
+ if (!base::PathExists(dir))
file_util::CreateDirectory(dir);
dir = GetCustomWallpaperDir(kThumbnailWallpaperSubDir, email);
- if (!file_util::PathExists(dir))
+ if (!base::PathExists(dir))
file_util::CreateDirectory(dir);
}
@@ -846,25 +846,25 @@ void WallpaperManager::MoveCustomWallpapersOnWorker(const UserList& users) {
EnsureCustomWallpaperDirectories(email);
from_path = GetWallpaperPathForUser(email, true);
// Old wallpaper with extension name may still exist.
- if (!file_util::PathExists(from_path))
+ if (!base::PathExists(from_path))
from_path = from_path.AddExtension(".png");
- if (file_util::PathExists(from_path)) {
+ if (base::PathExists(from_path)) {
// Appends DUMMY to the file name of moved custom wallpaper. This way we
// do not need to update WallpaperInfo for user.
to_path = GetCustomWallpaperPath(kSmallWallpaperSubDir, email, "DUMMY");
base::Move(from_path, to_path);
}
from_path = GetWallpaperPathForUser(email, false);
- if (!file_util::PathExists(from_path))
+ if (!base::PathExists(from_path))
from_path = from_path.AddExtension(".png");
- if (file_util::PathExists(from_path)) {
+ if (base::PathExists(from_path)) {
to_path = GetCustomWallpaperPath(kLargeWallpaperSubDir, email, "DUMMY");
base::Move(from_path, to_path);
}
from_path = GetOriginalWallpaperPathForUser(email);
- if (!file_util::PathExists(from_path))
+ if (!base::PathExists(from_path))
from_path = from_path.AddExtension(".png");
- if (file_util::PathExists(from_path)) {
+ if (base::PathExists(from_path)) {
to_path = GetCustomWallpaperPath(kOriginalWallpaperSubDir, email,
"DUMMY");
base::Move(from_path, to_path);
@@ -922,8 +922,8 @@ void WallpaperManager::GetCustomWallpaperInternalOld(
IsRunningSequenceOnCurrentThread(sequence_token_));
std::string file_name = wallpaper_path.BaseName().value();
- if (!file_util::PathExists(wallpaper_path)) {
- if (file_util::PathExists(wallpaper_path.AddExtension(".png"))) {
+ if (!base::PathExists(wallpaper_path)) {
+ if (base::PathExists(wallpaper_path.AddExtension(".png"))) {
// Old wallpaper may have a png extension.
file_name += ".png";
} else {
@@ -935,7 +935,7 @@ void WallpaperManager::GetCustomWallpaperInternalOld(
}
base::FilePath valid_path = wallpaper_path.DirName().Append(file_name);
- if (!file_util::PathExists(valid_path))
+ if (!base::PathExists(valid_path))
valid_path = valid_path.AddExtension(".png");
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
@@ -956,7 +956,7 @@ void WallpaperManager::GetCustomWallpaperInternal(
IsRunningSequenceOnCurrentThread(sequence_token_));
base::FilePath valid_path = wallpaper_path;
- if (!file_util::PathExists(wallpaper_path)) {
+ if (!base::PathExists(wallpaper_path)) {
// Falls back on original file if the correct resoltuion file does not
// exist. This may happen when the original custom wallpaper is small or
// browser shutdown before resized wallpaper saved.
@@ -964,7 +964,7 @@ void WallpaperManager::GetCustomWallpaperInternal(
info.file);
}
- if (!file_util::PathExists(valid_path)) {
+ if (!base::PathExists(valid_path)) {
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
diff --git a/chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc b/chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc
index 77b3be6..77833c0 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc
+++ b/chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc
@@ -291,8 +291,8 @@ IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest,
EXPECT_EQ(3, LoadedWallpapers());
base::FilePath new_wallpaper_path = GetCustomWallpaperPath(
kOriginalWallpaperSubDir, kTestUser1, "DUMMY");
- EXPECT_FALSE(file_util::PathExists(old_wallpaper_path));
- EXPECT_TRUE(file_util::PathExists(new_wallpaper_path));
+ EXPECT_FALSE(base::PathExists(old_wallpaper_path));
+ EXPECT_TRUE(base::PathExists(new_wallpaper_path));
}
// Some users have old user profiles which may have legacy wallpapers. And these
diff --git a/chrome/browser/chromeos/mobile/mobile_activator.cc b/chrome/browser/chromeos/mobile/mobile_activator.cc
index 2628fb1..db658b1 100644
--- a/chrome/browser/chromeos/mobile/mobile_activator.cc
+++ b/chrome/browser/chromeos/mobile/mobile_activator.cc
@@ -89,7 +89,7 @@ void CellularConfigDocument::LoadCellularConfigFile() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// Load partner customization startup manifest if it is available.
base::FilePath config_path(kCellularConfigPath);
- if (!file_util::PathExists(config_path))
+ if (!base::PathExists(config_path))
return;
if (LoadFromFile(config_path))
diff --git a/chrome/browser/chromeos/policy/app_pack_updater.cc b/chrome/browser/chromeos/policy/app_pack_updater.cc
index 628150f..7ce7a20 100644
--- a/chrome/browser/chromeos/policy/app_pack_updater.cc
+++ b/chrome/browser/chromeos/policy/app_pack_updater.cc
@@ -478,7 +478,7 @@ void AppPackUpdater::BlockingInstallCacheEntry(
base::FilePath cache_dir(kAppPackCacheDir);
base::FilePath cached_crx_path = cache_dir.Append(basename);
- if (file_util::PathExists(cached_crx_path)) {
+ if (base::PathExists(cached_crx_path)) {
LOG(WARNING) << "AppPack downloaded a crx whose filename will overwrite "
<< "an existing cached crx.";
base::Delete(cached_crx_path, true /* recursive */);
diff --git a/chrome/browser/chromeos/policy/enterprise_install_attributes.cc b/chrome/browser/chromeos/policy/enterprise_install_attributes.cc
index 0f04454..c4eef36 100644
--- a/chrome/browser/chromeos/policy/enterprise_install_attributes.cc
+++ b/chrome/browser/chromeos/policy/enterprise_install_attributes.cc
@@ -100,7 +100,7 @@ EnterpriseInstallAttributes::~EnterpriseInstallAttributes() {}
void EnterpriseInstallAttributes::ReadCacheFile(
const base::FilePath& cache_file) {
- if (device_locked_ || !file_util::PathExists(cache_file))
+ if (device_locked_ || !base::PathExists(cache_file))
return;
device_locked_ = true;
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc
index ae9b79c..651de62 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc
@@ -409,7 +409,7 @@ void UserCloudPolicyStoreChromeOS::InstallLegacyTokens(
// static
void UserCloudPolicyStoreChromeOS::RemoveLegacyCacheDir(
const base::FilePath& dir) {
- if (file_util::PathExists(dir) && !base::Delete(dir, true))
+ if (base::PathExists(dir) && !base::Delete(dir, true))
LOG(ERROR) << "Failed to remove cache dir " << dir.value();
}
@@ -430,7 +430,7 @@ void UserCloudPolicyStoreChromeOS::ReloadPolicyKey(
// static
void UserCloudPolicyStoreChromeOS::LoadPolicyKey(const base::FilePath& path,
std::vector<uint8>* key) {
- if (!file_util::PathExists(path)) {
+ if (!base::PathExists(path)) {
// There is no policy key the first time that a user fetches policy. If
// |path| does not exist then that is the most likely scenario, so there's
// no need to sample a failure.
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc b/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc
index a552ef9..96f19d6 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc
@@ -502,7 +502,7 @@ TEST_F(UserCloudPolicyStoreChromeOSTest, MigrationAndStoreNew) {
store_->policy()->SerializeAsString());
VerifyPolicyMap(kDefaultHomepage);
EXPECT_EQ(CloudPolicyStore::STATUS_OK, store_->status());
- EXPECT_TRUE(file_util::PathExists(policy_file()));
+ EXPECT_TRUE(base::PathExists(policy_file()));
// Now store a new policy using the new homepage location.
const char kNewHomepage[] = "http://google.com";
@@ -516,7 +516,7 @@ TEST_F(UserCloudPolicyStoreChromeOSTest, MigrationAndStoreNew) {
VerifyPolicyMap(kNewHomepage);
// Verify that the legacy cache has been removed.
- EXPECT_FALSE(file_util::PathExists(policy_file()));
+ EXPECT_FALSE(base::PathExists(policy_file()));
}
} // namespace
diff --git a/chrome/browser/chromeos/policy/user_policy_disk_cache.cc b/chrome/browser/chromeos/policy/user_policy_disk_cache.cc
index 456e1c7..bb93e89 100644
--- a/chrome/browser/chromeos/policy/user_policy_disk_cache.cc
+++ b/chrome/browser/chromeos/policy/user_policy_disk_cache.cc
@@ -66,7 +66,7 @@ void UserPolicyDiskCache::LoadOnFileThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
em::CachedCloudPolicyResponse cached_response;
- if (!file_util::PathExists(backing_file_path_)) {
+ if (!base::PathExists(backing_file_path_)) {
LoadDone(LOAD_RESULT_NOT_FOUND, cached_response);
return;
}
diff --git a/chrome/browser/chromeos/policy/user_policy_token_loader.cc b/chrome/browser/chromeos/policy/user_policy_token_loader.cc
index 666e2be..b20c4d2 100644
--- a/chrome/browser/chromeos/policy/user_policy_token_loader.cc
+++ b/chrome/browser/chromeos/policy/user_policy_token_loader.cc
@@ -58,7 +58,7 @@ void UserPolicyTokenLoader::LoadOnFileThread() {
std::string device_token;
std::string device_id;
- if (file_util::PathExists(cache_file_)) {
+ if (base::PathExists(cache_file_)) {
std::string data;
em::DeviceCredentials device_credentials;
if (file_util::ReadFileToString(cache_file_, &data) &&
diff --git a/chrome/browser/chromeos/settings/owner_key_util.cc b/chrome/browser/chromeos/settings/owner_key_util.cc
index d1bbbd4..2b333d1 100644
--- a/chrome/browser/chromeos/settings/owner_key_util.cc
+++ b/chrome/browser/chromeos/settings/owner_key_util.cc
@@ -71,7 +71,7 @@ crypto::RSAPrivateKey* OwnerKeyUtilImpl::FindPrivateKey(
}
bool OwnerKeyUtilImpl::IsPublicKeyPresent() {
- return file_util::PathExists(key_file_);
+ return base::PathExists(key_file_);
}
} // namespace chromeos
diff --git a/chrome/browser/chromeos/system/input_device_settings.cc b/chrome/browser/chromeos/system/input_device_settings.cc
index d937267..dec6b5f 100644
--- a/chrome/browser/chromeos/system/input_device_settings.cc
+++ b/chrome/browser/chromeos/system/input_device_settings.cc
@@ -30,7 +30,7 @@ const char kMouseControl[] = "/opt/google/mouse/mousecontrol";
bool ScriptExists(const std::string& script) {
DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
- return file_util::PathExists(base::FilePath(script));
+ return base::PathExists(base::FilePath(script));
}
// Executes the input control script asynchronously, if it exists.
diff --git a/chrome/browser/chromeos/system/timezone_settings.cc b/chrome/browser/chromeos/system/timezone_settings.cc
index 5aa6593..83946f5 100644
--- a/chrome/browser/chromeos/system/timezone_settings.cc
+++ b/chrome/browser/chromeos/system/timezone_settings.cc
@@ -201,7 +201,7 @@ void SetTimezoneIDFromString(const std::string& id) {
base::FilePath timezone_file(kTimezoneFilesDir + id);
// Make sure timezone_file exists.
- if (!file_util::PathExists(timezone_file)) {
+ if (!base::PathExists(timezone_file)) {
LOG(ERROR) << "SetTimezoneID: Cannot find timezone file "
<< timezone_file.value();
return;
diff --git a/chrome/browser/component_updater/component_patcher.cc b/chrome/browser/component_updater/component_patcher.cc
index 54bc62d..de082a7 100644
--- a/chrome/browser/component_updater/component_patcher.cc
+++ b/chrome/browser/component_updater/component_patcher.cc
@@ -20,7 +20,7 @@ namespace {
base::ListValue* ReadCommands(const base::FilePath& unpack_path) {
const base::FilePath commands =
unpack_path.Append(FILE_PATH_LITERAL("commands.json"));
- if (!file_util::PathExists(commands))
+ if (!base::PathExists(commands))
return NULL;
JSONFileValueSerializer serializer(commands);
diff --git a/chrome/browser/component_updater/component_patcher_win.cc b/chrome/browser/component_updater/component_patcher_win.cc
index a2f6865..76a72c5d 100644
--- a/chrome/browser/component_updater/component_patcher_win.cc
+++ b/chrome/browser/component_updater/component_patcher_win.cc
@@ -42,12 +42,12 @@ base::FilePath FindSetupProgram() {
base::FilePath setup_path = exe_dir;
setup_path = setup_path.AppendASCII(installer_dir);
setup_path = setup_path.AppendASCII(setup_exe);
- if (file_util::PathExists(setup_path))
+ if (base::PathExists(setup_path))
return setup_path;
setup_path = exe_dir;
setup_path = setup_path.AppendASCII(setup_exe);
- if (file_util::PathExists(setup_path))
+ if (base::PathExists(setup_path))
return setup_path;
return base::FilePath();
diff --git a/chrome/browser/component_updater/component_unpacker.cc b/chrome/browser/component_updater/component_unpacker.cc
index de7cfcb..1e3e558 100644
--- a/chrome/browser/component_updater/component_unpacker.cc
+++ b/chrome/browser/component_updater/component_unpacker.cc
@@ -92,7 +92,7 @@ class CRXValidator {
base::DictionaryValue* ReadManifest(const base::FilePath& unpack_path) {
base::FilePath manifest =
unpack_path.Append(FILE_PATH_LITERAL("manifest.json"));
- if (!file_util::PathExists(manifest))
+ if (!base::PathExists(manifest))
return NULL;
JSONFileValueSerializer serializer(manifest);
std::string error;
@@ -109,7 +109,7 @@ base::DictionaryValue* ReadManifest(const base::FilePath& unpack_path) {
// This method doesn't take any special steps to prevent files from
// being inserted into the target directory by another process or thread.
bool MakeEmptyDirectory(const base::FilePath& path) {
- if (file_util::PathExists(path)) {
+ if (base::PathExists(path)) {
if (!base::Delete(path, true))
return false;
}
diff --git a/chrome/browser/component_updater/pepper_flash_component_installer.cc b/chrome/browser/component_updater/pepper_flash_component_installer.cc
index c7cf4da..5f5d369 100644
--- a/chrome/browser/component_updater/pepper_flash_component_installer.cc
+++ b/chrome/browser/component_updater/pepper_flash_component_installer.cc
@@ -274,13 +274,13 @@ bool PepperFlashComponentInstaller::Install(
return false;
if (current_version_.CompareTo(version) > 0)
return false;
- if (!file_util::PathExists(unpack_path.Append(
+ if (!base::PathExists(unpack_path.Append(
chrome::kPepperFlashPluginFilename)))
return false;
// Passed the basic tests. Time to install it.
base::FilePath path =
GetPepperFlashBaseDirectory().AppendASCII(version.GetString());
- if (file_util::PathExists(path))
+ if (base::PathExists(path))
return false;
if (!base::Move(unpack_path, path))
return false;
@@ -358,7 +358,7 @@ void FinishPepperFlashUpdateRegistration(ComponentUpdateService* cus,
void StartPepperFlashUpdateRegistration(ComponentUpdateService* cus) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
base::FilePath path = GetPepperFlashBaseDirectory();
- if (!file_util::PathExists(path)) {
+ if (!base::PathExists(path)) {
if (!file_util::CreateDirectory(path)) {
NOTREACHED() << "Could not create Pepper Flash directory.";
return;
@@ -369,7 +369,7 @@ void StartPepperFlashUpdateRegistration(ComponentUpdateService* cus) {
std::vector<base::FilePath> older_dirs;
if (GetPepperFlashDirectory(&path, &version, &older_dirs)) {
path = path.Append(chrome::kPepperFlashPluginFilename);
- if (file_util::PathExists(path)) {
+ if (base::PathExists(path)) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&RegisterPepperFlashWithChrome, path, version));
diff --git a/chrome/browser/component_updater/pnacl/pnacl_component_installer.cc b/chrome/browser/component_updater/pnacl/pnacl_component_installer.cc
index 44b66f3..e0ad6c3 100644
--- a/chrome/browser/component_updater/pnacl/pnacl_component_installer.cc
+++ b/chrome/browser/component_updater/pnacl/pnacl_component_installer.cc
@@ -122,7 +122,7 @@ base::DictionaryValue* ReadJSONManifest(
base::DictionaryValue* ReadPnaclManifest(const base::FilePath& unpack_path) {
base::FilePath manifest_path = GetPlatformDir(unpack_path).AppendASCII(
"pnacl_public_pnacl_json");
- if (!file_util::PathExists(manifest_path))
+ if (!base::PathExists(manifest_path))
return NULL;
return ReadJSONManifest(manifest_path);
}
@@ -132,7 +132,7 @@ base::DictionaryValue* ReadComponentManifest(
const base::FilePath& unpack_path) {
base::FilePath manifest_path = unpack_path.Append(
FILE_PATH_LITERAL("manifest.json"));
- if (!file_util::PathExists(manifest_path))
+ if (!base::PathExists(manifest_path))
return NULL;
return ReadJSONManifest(manifest_path);
}
@@ -265,7 +265,7 @@ bool PnaclComponentInstaller::Install(const base::DictionaryValue& manifest,
// Passed the basic tests. Time to install it.
base::FilePath path = GetPnaclBaseDirectory().AppendASCII(
version.GetString());
- if (file_util::PathExists(path)) {
+ if (base::PathExists(path)) {
LOG(WARNING) << "Target path already exists, not installing.";
NotifyInstallError();
return false;
@@ -372,7 +372,7 @@ void FinishPnaclUpdateRegistration(const Version& current_version,
void StartPnaclUpdateRegistration(PnaclComponentInstaller* pci) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
base::FilePath path = pci->GetPnaclBaseDirectory();
- if (!file_util::PathExists(path)) {
+ if (!base::PathExists(path)) {
if (!file_util::CreateDirectory(path)) {
NOTREACHED() << "Could not create base Pnacl directory.";
return;
diff --git a/chrome/browser/component_updater/recovery_component_installer.cc b/chrome/browser/component_updater/recovery_component_installer.cc
index 4891aab1..625afd6 100644
--- a/chrome/browser/component_updater/recovery_component_installer.cc
+++ b/chrome/browser/component_updater/recovery_component_installer.cc
@@ -112,7 +112,7 @@ bool RecoveryComponentInstaller::Install(const base::DictionaryValue& manifest,
if (current_version_.CompareTo(version) >= 0)
return false;
base::FilePath main_file = unpack_path.Append(kRecoveryFileName);
- if (!file_util::PathExists(main_file))
+ if (!base::PathExists(main_file))
return false;
// Passed the basic tests. The installation continues with the
// recovery component itself running from the temp directory.
diff --git a/chrome/browser/component_updater/swiftshader_component_installer.cc b/chrome/browser/component_updater/swiftshader_component_installer.cc
index 9aa42e0..12e8d8a 100644
--- a/chrome/browser/component_updater/swiftshader_component_installer.cc
+++ b/chrome/browser/component_updater/swiftshader_component_installer.cc
@@ -72,8 +72,8 @@ bool GetLatestSwiftShaderDirectory(base::FilePath* result,
if (!version.IsValid())
continue;
if (version.CompareTo(*latest) > 0 &&
- file_util::PathExists(path.Append(kSwiftShaderEglName)) &&
- file_util::PathExists(path.Append(kSwiftShaderGlesName))) {
+ base::PathExists(path.Append(kSwiftShaderEglName)) &&
+ base::PathExists(path.Append(kSwiftShaderGlesName))) {
if (found && older_dirs)
older_dirs->push_back(*result);
*latest = version;
@@ -135,13 +135,13 @@ bool SwiftShaderComponentInstaller::Install(
return false;
if (current_version_.CompareTo(version) >= 0)
return false;
- if (!file_util::PathExists(unpack_path.Append(kSwiftShaderEglName)) ||
- !file_util::PathExists(unpack_path.Append(kSwiftShaderGlesName)))
+ if (!base::PathExists(unpack_path.Append(kSwiftShaderEglName)) ||
+ !base::PathExists(unpack_path.Append(kSwiftShaderGlesName)))
return false;
// Passed the basic tests. Time to install it.
base::FilePath path =
GetSwiftShaderBaseDirectory().AppendASCII(version.GetString());
- if (file_util::PathExists(path))
+ if (base::PathExists(path))
return false;
if (!base::Move(unpack_path, path))
return false;
@@ -208,7 +208,7 @@ void UpdateChecker::OnGpuInfoUpdate() {
void RegisterSwiftShaderPath(ComponentUpdateService* cus) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
base::FilePath path = GetSwiftShaderBaseDirectory();
- if (!file_util::PathExists(path)) {
+ if (!base::PathExists(path)) {
if (!file_util::CreateDirectory(path)) {
NOTREACHED() << "Could not create SwiftShader directory.";
return;
diff --git a/chrome/browser/component_updater/test/component_installers_unittest.cc b/chrome/browser/component_updater/test/component_installers_unittest.cc
index 91b59bb..a97bb18 100644
--- a/chrome/browser/component_updater/test/component_installers_unittest.cc
+++ b/chrome/browser/component_updater/test/component_installers_unittest.cc
@@ -65,7 +65,7 @@ TEST(ComponentInstallerTest, MAYBE_PepperFlashCheck) {
manifest = manifest.Append(kDataPath);
manifest = manifest.AppendASCII("manifest.json");
- if (!file_util::PathExists(manifest)) {
+ if (!base::PathExists(manifest)) {
LOG(WARNING) << "No test manifest available. Skipping.";
return;
}
diff --git a/chrome/browser/component_updater/widevine_cdm_component_installer.cc b/chrome/browser/component_updater/widevine_cdm_component_installer.cc
index fe69eda..96a2345 100644
--- a/chrome/browser/component_updater/widevine_cdm_component_installer.cc
+++ b/chrome/browser/component_updater/widevine_cdm_component_installer.cc
@@ -221,18 +221,18 @@ bool WidevineCdmComponentInstaller::Install(
if (current_version_.CompareTo(version) > 0)
return false;
- if (!file_util::PathExists(unpack_path.AppendASCII(kWidevineCdmFileName)))
+ if (!base::PathExists(unpack_path.AppendASCII(kWidevineCdmFileName)))
return false;
base::FilePath adapter_source_path;
PathService::Get(chrome::FILE_WIDEVINE_CDM_ADAPTER, &adapter_source_path);
- if (!file_util::PathExists(adapter_source_path))
+ if (!base::PathExists(adapter_source_path))
return false;
// Passed the basic tests. Time to install it.
base::FilePath install_path =
GetWidevineCdmBaseDirectory().AppendASCII(version.GetString());
- if (file_util::PathExists(install_path))
+ if (base::PathExists(install_path))
return false;
if (!base::Move(unpack_path, install_path))
return false;
@@ -281,7 +281,7 @@ void FinishWidevineCdmUpdateRegistration(ComponentUpdateService* cus,
void StartWidevineCdmUpdateRegistration(ComponentUpdateService* cus) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
base::FilePath base_dir = GetWidevineCdmBaseDirectory();
- if (!file_util::PathExists(base_dir) &&
+ if (!base::PathExists(base_dir) &&
!file_util::CreateDirectory(base_dir)) {
NOTREACHED() << "Could not create Widevine CDM directory.";
return;
@@ -296,8 +296,8 @@ void StartWidevineCdmUpdateRegistration(ComponentUpdateService* cus) {
latest_dir.AppendASCII(kWidevineCdmAdapterFileName);
base::FilePath cdm_path = latest_dir.AppendASCII(kWidevineCdmFileName);
- if (file_util::PathExists(adapter_path) &&
- file_util::PathExists(cdm_path)) {
+ if (base::PathExists(adapter_path) &&
+ base::PathExists(cdm_path)) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&RegisterWidevineCdmWithChrome, adapter_path, version));
diff --git a/chrome/browser/content_settings/content_settings_browsertest.cc b/chrome/browser/content_settings/content_settings_browsertest.cc
index 857612c..4acdfd4 100644
--- a/chrome/browser/content_settings/content_settings_browsertest.cc
+++ b/chrome/browser/content_settings/content_settings_browsertest.cc
@@ -496,7 +496,7 @@ class PepperContentSettingsTest : public ContentSettingsTest {
base::FilePath plugin_dir;
EXPECT_TRUE(PathService::Get(base::DIR_MODULE, &plugin_dir));
base::FilePath plugin_lib = plugin_dir.AppendASCII(kLibraryName);
- EXPECT_TRUE(file_util::PathExists(plugin_lib));
+ EXPECT_TRUE(base::PathExists(plugin_lib));
base::FilePath::StringType pepper_plugin = plugin_lib.value();
pepper_plugin.append(FILE_PATH_LITERAL(
"#Clear Key CDM#Clear Key CDM 0.1.0.0#0.1.0.0;"));
diff --git a/chrome/browser/diagnostics/recon_diagnostics.cc b/chrome/browser/diagnostics/recon_diagnostics.cc
index fc69ad7..f2043e5 100644
--- a/chrome/browser/diagnostics/recon_diagnostics.cc
+++ b/chrome/browser/diagnostics/recon_diagnostics.cc
@@ -245,7 +245,7 @@ class PathTest : public DiagnosticsTest {
RecordStopFailure(DIAG_RECON_PATH_PROVIDER, "Path provider failure");
return false;
}
- if (!file_util::PathExists(dir_or_file)) {
+ if (!base::PathExists(dir_or_file)) {
RecordFailure(
DIAG_RECON_PATH_NOT_FOUND,
"Path not found: " + UTF16ToUTF8(dir_or_file.LossyDisplayName()));
@@ -332,7 +332,7 @@ class JSONTest : public DiagnosticsTest {
: DiagnosticsTest(id, name), path_(path), max_file_size_(max_file_size) {}
virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) OVERRIDE {
- if (!file_util::PathExists(path_)) {
+ if (!base::PathExists(path_)) {
RecordFailure(DIAG_RECON_FILE_NOT_FOUND, "File not found");
return true;
}
diff --git a/chrome/browser/diagnostics/sqlite_diagnostics.cc b/chrome/browser/diagnostics/sqlite_diagnostics.cc
index ed938d3..81753a8 100644
--- a/chrome/browser/diagnostics/sqlite_diagnostics.cc
+++ b/chrome/browser/diagnostics/sqlite_diagnostics.cc
@@ -63,7 +63,7 @@ class SqliteIntegrityTest : public DiagnosticsTest {
else
path = db_path_;
- if (!file_util::PathExists(path)) {
+ if (!base::PathExists(path)) {
if (critical_) {
RecordOutcome(DIAG_SQLITE_FILE_NOT_FOUND,
"File not found",
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index 2274fb7..d4d2905 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -370,7 +370,7 @@ void ChromeDownloadManagerDelegate::CheckForFileExistence(
#endif
BrowserThread::PostTaskAndReplyWithResult(
BrowserThread::FILE, FROM_HERE,
- base::Bind(&file_util::PathExists, download->GetTargetFilePath()),
+ base::Bind(&base::PathExists, download->GetTargetFilePath()),
callback);
}
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index b501650..2836388 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -660,13 +660,13 @@ class DownloadTest : public InProcessBrowserTest {
bool CheckDownloadFullPaths(Browser* browser,
const base::FilePath& downloaded_file,
const base::FilePath& origin_file) {
- bool origin_file_exists = file_util::PathExists(origin_file);
+ bool origin_file_exists = base::PathExists(origin_file);
EXPECT_TRUE(origin_file_exists) << origin_file.value();
if (!origin_file_exists)
return false;
// Confirm the downloaded data file exists.
- bool downloaded_file_exists = file_util::PathExists(downloaded_file);
+ bool downloaded_file_exists = base::PathExists(downloaded_file);
EXPECT_TRUE(downloaded_file_exists) << downloaded_file.value();
if (!downloaded_file_exists)
return false;
@@ -783,7 +783,7 @@ class DownloadTest : public InProcessBrowserTest {
downloads_directory_.path().Append(basefilename);
EXPECT_TRUE(browser->window()->IsDownloadShelfVisible());
- bool downloaded_path_exists = file_util::PathExists(download_path);
+ bool downloaded_path_exists = base::PathExists(download_path);
EXPECT_TRUE(downloaded_path_exists);
if (!downloaded_path_exists)
return false;
@@ -796,7 +796,7 @@ class DownloadTest : public InProcessBrowserTest {
// Delete the file we just downloaded.
EXPECT_TRUE(file_util::DieFileDie(download_path, true));
- EXPECT_FALSE(file_util::PathExists(download_path));
+ EXPECT_FALSE(base::PathExists(download_path));
return true;
}
@@ -958,7 +958,7 @@ class DownloadTest : public InProcessBrowserTest {
// Clean up the file, in case it ended up in the My Documents folder.
base::FilePath destination_folder = GetDownloadDirectory(browser());
base::FilePath my_downloaded_file = item->GetTargetFilePath();
- EXPECT_TRUE(file_util::PathExists(my_downloaded_file));
+ EXPECT_TRUE(base::PathExists(my_downloaded_file));
EXPECT_TRUE(base::Delete(my_downloaded_file, false));
EXPECT_EQ(download_info.should_redirect_to_documents ?
@@ -1209,7 +1209,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, NoDownload) {
ui_test_utils::NavigateToURL(browser(), url);
// Check that we did not download the web page.
- EXPECT_FALSE(file_util::PathExists(file_path));
+ EXPECT_FALSE(base::PathExists(file_path));
// Check state.
EXPECT_EQ(1, browser()->tab_strip_model()->count());
@@ -1295,7 +1295,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadResourceThrottleCancels) {
// Check that we did not download the file.
base::FilePath file(FILE_PATH_LITERAL("download-test1.lib"));
base::FilePath file_path(DestinationFile(browser(), file));
- EXPECT_FALSE(file_util::PathExists(file_path));
+ EXPECT_FALSE(base::PathExists(file_path));
// Check state.
EXPECT_EQ(1, browser()->tab_strip_model()->count());
@@ -1464,7 +1464,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadTest_IncognitoRegular) {
// later.
base::FilePath origin(OriginFile(base::FilePath(FILE_PATH_LITERAL(
"downloads/a_zip_file.zip"))));
- ASSERT_TRUE(file_util::PathExists(origin));
+ ASSERT_TRUE(base::PathExists(origin));
int64 origin_file_size = 0;
EXPECT_TRUE(file_util::GetFileSize(origin, &origin_file_size));
std::string original_contents;
@@ -1485,7 +1485,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadTest_IncognitoRegular) {
ASSERT_EQ(1UL, download_items.size());
ASSERT_EQ(base::FilePath(FILE_PATH_LITERAL("a_zip_file.zip")),
download_items[0]->GetTargetFilePath().BaseName());
- ASSERT_TRUE(file_util::PathExists(download_items[0]->GetTargetFilePath()));
+ ASSERT_TRUE(base::PathExists(download_items[0]->GetTargetFilePath()));
EXPECT_TRUE(VerifyFile(download_items[0]->GetTargetFilePath(),
original_contents, origin_file_size));
@@ -1517,7 +1517,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadTest_IncognitoRegular) {
ASSERT_EQ(1UL, download_items.size());
ASSERT_EQ(base::FilePath(FILE_PATH_LITERAL("a_zip_file (1).zip")),
download_items[0]->GetTargetFilePath().BaseName());
- ASSERT_TRUE(file_util::PathExists(download_items[0]->GetTargetFilePath()));
+ ASSERT_TRUE(base::PathExists(download_items[0]->GetTargetFilePath()));
EXPECT_TRUE(VerifyFile(download_items[0]->GetTargetFilePath(),
original_contents, origin_file_size));
}
@@ -2010,7 +2010,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, AnchorDownloadTag) {
// Confirm the downloaded data exists.
base::FilePath downloaded_file = GetDownloadDirectory(browser());
downloaded_file = downloaded_file.Append(FILE_PATH_LITERAL("a_red_dot.png"));
- EXPECT_TRUE(file_util::PathExists(downloaded_file));
+ EXPECT_TRUE(base::PathExists(downloaded_file));
}
// Test to make sure auto-open works.
@@ -2819,7 +2819,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadTest_Renaming) {
content::DownloadManager* manager = DownloadManagerForBrowser(browser());
base::FilePath origin_file(OriginFile(base::FilePath(FILE_PATH_LITERAL(
"downloads/a_zip_file.zip"))));
- ASSERT_TRUE(file_util::PathExists(origin_file));
+ ASSERT_TRUE(base::PathExists(origin_file));
std::string origin_contents;
ASSERT_TRUE(file_util::ReadFileToString(origin_file, &origin_contents));
@@ -2836,7 +2836,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadTest_Renaming) {
(index == 0 ? std::string(".zip") :
base::StringPrintf(" (%d).zip", index)),
target_path.BaseName().AsUTF8Unsafe());
- ASSERT_TRUE(file_util::PathExists(target_path));
+ ASSERT_TRUE(base::PathExists(target_path));
ASSERT_TRUE(VerifyFile(target_path, origin_contents,
origin_contents.size()));
}
@@ -3021,7 +3021,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, MAYBE_DownloadTest_PercentComplete) {
EXPECT_TRUE(browser()->window()->IsDownloadShelfVisible());
// Check that the file downloaded correctly.
- ASSERT_TRUE(file_util::PathExists(download_items[0]->GetTargetFilePath()));
+ ASSERT_TRUE(base::PathExists(download_items[0]->GetTargetFilePath()));
int64 downloaded_size = 0;
ASSERT_TRUE(file_util::GetFileSize(
download_items[0]->GetTargetFilePath(), &downloaded_size));
diff --git a/chrome/browser/download/download_path_reservation_tracker.cc b/chrome/browser/download/download_path_reservation_tracker.cc
index 554cc12..d241649 100644
--- a/chrome/browser/download/download_path_reservation_tracker.cc
+++ b/chrome/browser/download/download_path_reservation_tracker.cc
@@ -96,7 +96,7 @@ bool IsPathInUse(const base::FilePath& path) {
return true;
// If the path exists in the file system, then the path is in use.
- if (file_util::PathExists(path))
+ if (base::PathExists(path))
return true;
return false;
diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc
index 33d1de6..0a975d2 100644
--- a/chrome/browser/download/save_page_browsertest.cc
+++ b/chrome/browser/download/save_page_browsertest.cc
@@ -401,8 +401,8 @@ IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, MAYBE_SaveHTMLOnly) {
ASSERT_TRUE(VerifySavePackageExpectations(browser(), url));
persisted.WaitForPersisted();
EXPECT_TRUE(browser()->window()->IsDownloadShelfVisible());
- EXPECT_TRUE(file_util::PathExists(full_file_name));
- EXPECT_FALSE(file_util::PathExists(dir));
+ EXPECT_TRUE(base::PathExists(full_file_name));
+ EXPECT_FALSE(base::PathExists(dir));
EXPECT_TRUE(file_util::ContentsEqual(test_dir_.Append(base::FilePath(
kTestDir)).Append(FILE_PATH_LITERAL("a.htm")), full_file_name));
}
@@ -469,8 +469,8 @@ IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, SaveHTMLOnlyTabDestroy) {
GetCurrentTab(browser())->Close();
EXPECT_EQ(DownloadItem::CANCELLED, items[0]->GetState());
- EXPECT_FALSE(file_util::PathExists(full_file_name));
- EXPECT_FALSE(file_util::PathExists(dir));
+ EXPECT_FALSE(base::PathExists(full_file_name));
+ EXPECT_FALSE(base::PathExists(dir));
}
// Disabled on Windows due to flakiness. http://crbug.com/162323
@@ -506,8 +506,8 @@ IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, MAYBE_SaveViewSourceHTMLOnly) {
EXPECT_TRUE(browser()->window()->IsDownloadShelfVisible());
- EXPECT_TRUE(file_util::PathExists(full_file_name));
- EXPECT_FALSE(file_util::PathExists(dir));
+ EXPECT_TRUE(base::PathExists(full_file_name));
+ EXPECT_FALSE(base::PathExists(dir));
EXPECT_TRUE(file_util::ContentsEqual(
test_dir_.Append(base::FilePath(kTestDir)).Append(file_name),
full_file_name));
@@ -541,8 +541,8 @@ IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, MAYBE_SaveCompleteHTML) {
EXPECT_TRUE(browser()->window()->IsDownloadShelfVisible());
- EXPECT_TRUE(file_util::PathExists(full_file_name));
- EXPECT_TRUE(file_util::PathExists(dir));
+ EXPECT_TRUE(base::PathExists(full_file_name));
+ EXPECT_TRUE(base::PathExists(dir));
EXPECT_TRUE(file_util::TextContentsEqual(
test_dir_.Append(base::FilePath(kTestDir)).AppendASCII("b.saved1.htm"),
full_file_name));
@@ -639,8 +639,8 @@ IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, MAYBE_FileNameFromPageTitle) {
EXPECT_TRUE(browser()->window()->IsDownloadShelfVisible());
- EXPECT_TRUE(file_util::PathExists(full_file_name));
- EXPECT_TRUE(file_util::PathExists(dir));
+ EXPECT_TRUE(base::PathExists(full_file_name));
+ EXPECT_TRUE(base::PathExists(dir));
EXPECT_TRUE(file_util::TextContentsEqual(
test_dir_.Append(base::FilePath(kTestDir)).AppendASCII("b.saved2.htm"),
full_file_name));
@@ -691,8 +691,8 @@ IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, MAYBE_RemoveFromList) {
removed.WaitForRemoved();
- EXPECT_TRUE(file_util::PathExists(full_file_name));
- EXPECT_FALSE(file_util::PathExists(dir));
+ EXPECT_TRUE(base::PathExists(full_file_name));
+ EXPECT_FALSE(base::PathExists(dir));
EXPECT_TRUE(file_util::ContentsEqual(test_dir_.Append(base::FilePath(
kTestDir)).Append(FILE_PATH_LITERAL("a.htm")), full_file_name));
}
@@ -710,7 +710,7 @@ IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, CleanFilenameFromPageTitle) {
download_dir.AppendASCII(std::string("test.exe") + kAppendedExtension);
base::FilePath dir = download_dir.AppendASCII("test.exe_files");
- EXPECT_FALSE(file_util::PathExists(full_file_name));
+ EXPECT_FALSE(base::PathExists(full_file_name));
GURL url = URLRequestMockHTTPJob::GetMockUrl(
base::FilePath(kTestDir).Append(file_name));
ui_test_utils::NavigateToURL(browser(), url);
@@ -724,7 +724,7 @@ IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, CleanFilenameFromPageTitle) {
chrome::SavePage(browser());
loop_runner->Run();
- EXPECT_TRUE(file_util::PathExists(full_file_name));
+ EXPECT_TRUE(base::PathExists(full_file_name));
EXPECT_TRUE(file_util::DieFileDie(full_file_name, false));
EXPECT_TRUE(file_util::DieFileDie(dir, true));
@@ -767,7 +767,7 @@ IN_PROC_BROWSER_TEST_F(SavePageAsMHTMLBrowserTest, SavePageAsMHTML) {
ASSERT_TRUE(VerifySavePackageExpectations(browser(), url));
persisted.WaitForPersisted();
- ASSERT_TRUE(file_util::PathExists(full_file_name));
+ ASSERT_TRUE(base::PathExists(full_file_name));
int64 actual_file_size = -1;
EXPECT_TRUE(file_util::GetFileSize(full_file_name, &actual_file_size));
EXPECT_LE(kFileSizeMin, actual_file_size);
@@ -787,7 +787,7 @@ IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, SavePageBrowserTest_NonMHTML) {
base::FilePath download_dir = DownloadPrefs::FromDownloadManager(
GetDownloadManager())->DownloadPath();
base::FilePath filename = download_dir.AppendASCII("dataurl.txt");
- ASSERT_TRUE(file_util::PathExists(filename));
+ ASSERT_TRUE(base::PathExists(filename));
std::string contents;
EXPECT_TRUE(file_util::ReadFileToString(filename, &contents));
EXPECT_EQ("foo", contents);
diff --git a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
index b3f08d0..0bb0c1f 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
@@ -1130,8 +1130,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
base::FilePath fake_path = all_downloads[1]->GetTargetFilePath();
EXPECT_EQ(0, file_util::WriteFile(real_path, "", 0));
- ASSERT_TRUE(file_util::PathExists(real_path));
- ASSERT_FALSE(file_util::PathExists(fake_path));
+ ASSERT_TRUE(base::PathExists(real_path));
+ ASSERT_FALSE(base::PathExists(fake_path));
for (DownloadManager::DownloadVector::iterator iter = all_downloads.begin();
iter != all_downloads.end();
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc
index a441157..0e6cd76 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.cc
+++ b/chrome/browser/extensions/api/file_system/file_system_api.cc
@@ -212,7 +212,7 @@ bool GetFilePathOfFileEntry(const std::string& filesystem_name,
bool DoCheckWritableFile(const base::FilePath& path,
const base::FilePath& extension_directory) {
// Don't allow links.
- if (file_util::PathExists(path) && file_util::IsLink(path))
+ if (base::PathExists(path) && file_util::IsLink(path))
return false;
if (extension_directory == path || extension_directory.IsParent(path))
diff --git a/chrome/browser/extensions/api/page_capture/page_capture_apitest.cc b/chrome/browser/extensions/api/page_capture/page_capture_apitest.cc
index a2bb28b..5eb86da 100644
--- a/chrome/browser/extensions/api/page_capture/page_capture_apitest.cc
+++ b/chrome/browser/extensions/api/page_capture/page_capture_apitest.cc
@@ -48,5 +48,5 @@ IN_PROC_BROWSER_TEST_F(ExtensionPageCaptureApiTest, SaveAsMHTML) {
// Flush the message loops to make sure the delete happens.
content::RunAllPendingInMessageLoop(content::BrowserThread::FILE);
content::RunAllPendingInMessageLoop(content::BrowserThread::IO);
- ASSERT_FALSE(file_util::PathExists(delegate.temp_file_));
+ ASSERT_FALSE(base::PathExists(delegate.temp_file_));
}
diff --git a/chrome/browser/extensions/api/record/record_api.cc b/chrome/browser/extensions/api/record/record_api.cc
index 866aae0..820c346 100644
--- a/chrome/browser/extensions/api/record/record_api.cc
+++ b/chrome/browser/extensions/api/record/record_api.cc
@@ -125,14 +125,14 @@ void RunPageCyclerFunction::RunTestBrowser() {
// Run the test browser (or a mockup, depending on |process_strategy_|.
while (repeat_count_-- && errors_.empty() &&
- !file_util::PathExists(error_file_path))
+ !base::PathExists(error_file_path))
process_strategy_->RunProcess(line, &errors_);
// Read URL errors file if there is one, and save errors in |errors_|.
// Odd extension handling needed because temp files have lots of "."s in
// their names, and we need to cleanly add kURLErrorsSuffix as a final
// extension.
- if (errors_.empty() && file_util::PathExists(error_file_path)) {
+ if (errors_.empty() && base::PathExists(error_file_path)) {
std::string error_content;
file_util::ReadFileToString(error_file_path, &error_content);
diff --git a/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc b/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc
index 9705531..fe0f660 100644
--- a/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc
+++ b/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc
@@ -165,7 +165,7 @@ TEST_F(ExtensionSettingsFrontendTest, LeveldbDatabaseDeletedFromDiskOnClear) {
StringValue bar("bar");
ValueStore::WriteResult result = storage->Set(DEFAULTS, "foo", bar);
ASSERT_FALSE(result->HasError());
- EXPECT_TRUE(file_util::PathExists(temp_dir_.path()));
+ EXPECT_TRUE(base::PathExists(temp_dir_.path()));
}
// Should need to both clear the database and delete the frontend for the
@@ -173,7 +173,7 @@ TEST_F(ExtensionSettingsFrontendTest, LeveldbDatabaseDeletedFromDiskOnClear) {
{
ValueStore::WriteResult result = storage->Clear();
ASSERT_FALSE(result->HasError());
- EXPECT_TRUE(file_util::PathExists(temp_dir_.path()));
+ EXPECT_TRUE(base::PathExists(temp_dir_.path()));
}
frontend_.reset();
@@ -181,7 +181,7 @@ TEST_F(ExtensionSettingsFrontendTest, LeveldbDatabaseDeletedFromDiskOnClear) {
// TODO(kalman): Figure out why this fails, despite appearing to work.
// Leaving this commented out rather than disabling the whole test so that the
// deletion code paths are at least exercised.
- //EXPECT_FALSE(file_util::PathExists(temp_dir_.path()));
+ //EXPECT_FALSE(base::PathExists(temp_dir_.path()));
}
TEST_F(ExtensionSettingsFrontendTest,
diff --git a/chrome/browser/extensions/api/storage/storage_schema_manifest_handler.cc b/chrome/browser/extensions/api/storage/storage_schema_manifest_handler.cc
index 9537c4b..db9b411 100644
--- a/chrome/browser/extensions/api/storage/storage_schema_manifest_handler.cc
+++ b/chrome/browser/extensions/api/storage/storage_schema_manifest_handler.cc
@@ -46,7 +46,7 @@ scoped_ptr<policy::PolicySchema> StorageSchemaManifestHandler::GetSchema(
return scoped_ptr<policy::PolicySchema>();
}
file = extension->path().AppendASCII(path);
- if (!file_util::PathExists(file)) {
+ if (!base::PathExists(file)) {
*error =
base::StringPrintf("File does not exist: %s", file.value().c_str());
return scoped_ptr<policy::PolicySchema>();
diff --git a/chrome/browser/extensions/convert_user_script_unittest.cc b/chrome/browser/extensions/convert_user_script_unittest.cc
index cc534f5..e1d4be1 100644
--- a/chrome/browser/extensions/convert_user_script_unittest.cc
+++ b/chrome/browser/extensions/convert_user_script_unittest.cc
@@ -79,9 +79,9 @@ TEST_F(ExtensionFromUserScript, Basic) {
EXPECT_TRUE(script.emulate_greasemonkey());
// Make sure the files actually exist on disk.
- EXPECT_TRUE(file_util::PathExists(
+ EXPECT_TRUE(base::PathExists(
extension->path().Append(script.js_scripts()[0].relative_path())));
- EXPECT_TRUE(file_util::PathExists(
+ EXPECT_TRUE(base::PathExists(
extension->path().Append(kManifestFilename)));
}
@@ -128,9 +128,9 @@ TEST_F(ExtensionFromUserScript, NoMetadata) {
EXPECT_EQ(expected, script.url_patterns());
// Make sure the files actually exist on disk.
- EXPECT_TRUE(file_util::PathExists(
+ EXPECT_TRUE(base::PathExists(
extension->path().Append(script.js_scripts()[0].relative_path())));
- EXPECT_TRUE(file_util::PathExists(
+ EXPECT_TRUE(base::PathExists(
extension->path().Append(kManifestFilename)));
}
@@ -230,7 +230,7 @@ TEST_F(ExtensionFromUserScript, RunAtDocumentIdle) {
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_file));
test_file = test_file.AppendASCII("extensions")
.AppendASCII("user_script_run_at_idle.user.js");
- ASSERT_TRUE(file_util::PathExists(test_file)) << test_file.value();
+ ASSERT_TRUE(base::PathExists(test_file)) << test_file.value();
string16 error;
scoped_refptr<Extension> extension(ConvertUserScriptToExtension(
diff --git a/chrome/browser/extensions/convert_web_app_unittest.cc b/chrome/browser/extensions/convert_web_app_unittest.cc
index 1fb1a4e..fe081da 100644
--- a/chrome/browser/extensions/convert_web_app_unittest.cc
+++ b/chrome/browser/extensions/convert_web_app_unittest.cc
@@ -150,7 +150,7 @@ TEST(ExtensionFromWebApp, Basic) {
web_app.icons[i].width,
ExtensionIconSet::MATCH_EXACTLY);
ASSERT_TRUE(!resource.empty());
- EXPECT_TRUE(file_util::PathExists(resource.GetFilePath()));
+ EXPECT_TRUE(base::PathExists(resource.GetFilePath()));
}
}
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index f2889f7..f4d0cda 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -250,7 +250,7 @@ base::FilePath ExtensionBrowserTest::PackExtension(
dir_path.ReplaceExtension(FILE_PATH_LITERAL(".pem"));
base::FilePath pem_path_out;
- if (!file_util::PathExists(pem_path)) {
+ if (!base::PathExists(pem_path)) {
pem_path = base::FilePath();
pem_path_out = crx_path.DirName().AppendASCII("temp.pem");
if (!base::Delete(pem_path_out, false)) {
@@ -267,12 +267,12 @@ base::FilePath ExtensionBrowserTest::PackExtensionWithOptions(
const base::FilePath& crx_path,
const base::FilePath& pem_path,
const base::FilePath& pem_out_path) {
- if (!file_util::PathExists(dir_path)) {
+ if (!base::PathExists(dir_path)) {
ADD_FAILURE() << "Extension dir not found: " << dir_path.value();
return base::FilePath();
}
- if (!file_util::PathExists(pem_path) && pem_out_path.empty()) {
+ if (!base::PathExists(pem_path) && pem_out_path.empty()) {
ADD_FAILURE() << "Must specify a PEM file or PEM output path";
return base::FilePath();
}
@@ -288,7 +288,7 @@ base::FilePath ExtensionBrowserTest::PackExtensionWithOptions(
return base::FilePath();
}
- if (!file_util::PathExists(crx_path)) {
+ if (!base::PathExists(crx_path)) {
ADD_FAILURE() << crx_path.value() << " was not created.";
return base::FilePath();
}
diff --git a/chrome/browser/extensions/extension_creator.cc b/chrome/browser/extensions/extension_creator.cc
index cedc048..975cd6d 100644
--- a/chrome/browser/extensions/extension_creator.cc
+++ b/chrome/browser/extensions/extension_creator.cc
@@ -57,7 +57,7 @@ bool ExtensionCreator::InitializeInput(
// Validate input |private_key| (if provided).
if (!private_key_path.value().empty() &&
- !file_util::PathExists(private_key_path)) {
+ !base::PathExists(private_key_path)) {
error_message_ =
l10n_util::GetStringUTF8(IDS_EXTENSION_PRIVATE_KEY_INVALID_PATH);
return false;
@@ -67,7 +67,7 @@ bool ExtensionCreator::InitializeInput(
// an existing private key.
if (private_key_path.value().empty() &&
!private_key_output_path.value().empty() &&
- file_util::PathExists(private_key_output_path)) {
+ base::PathExists(private_key_output_path)) {
error_message_ =
l10n_util::GetStringUTF8(IDS_EXTENSION_PRIVATE_KEY_EXISTS);
return false;
@@ -75,7 +75,7 @@ bool ExtensionCreator::InitializeInput(
// Check whether crx file already exists. Should be last check, as this is
// a warning only.
- if (!(run_flags & kOverwriteCRX) && file_util::PathExists(crx_path)) {
+ if (!(run_flags & kOverwriteCRX) && base::PathExists(crx_path)) {
error_message_ = l10n_util::GetStringUTF8(IDS_EXTENSION_CRX_EXISTS);
error_type_ = kCRXExists;
@@ -120,7 +120,7 @@ bool ExtensionCreator::ValidateManifest(const base::FilePath& extension_dir,
crypto::RSAPrivateKey* ExtensionCreator::ReadInputKey(const base::FilePath&
private_key_path) {
- if (!file_util::PathExists(private_key_path)) {
+ if (!base::PathExists(private_key_path)) {
error_message_ =
l10n_util::GetStringUTF8(IDS_EXTENSION_PRIVATE_KEY_NO_EXISTS);
return NULL;
@@ -236,7 +236,7 @@ bool ExtensionCreator::WriteCRX(const base::FilePath& zip_path,
crypto::RSAPrivateKey* private_key,
const std::vector<uint8>& signature,
const base::FilePath& crx_path) {
- if (file_util::PathExists(crx_path))
+ if (base::PathExists(crx_path))
base::Delete(crx_path, false);
ScopedStdioHandle crx_handle(file_util::OpenFile(crx_path, "wb"));
if (!crx_handle.get()) {
diff --git a/chrome/browser/extensions/extension_protocols.cc b/chrome/browser/extensions/extension_protocols.cc
index f4b8e39..5bb7a98 100644
--- a/chrome/browser/extensions/extension_protocols.cc
+++ b/chrome/browser/extensions/extension_protocols.cc
@@ -101,7 +101,7 @@ void ReadMimeTypeFromFile(const base::FilePath& filename,
void GetLastModifiedTime(const base::FilePath& filename,
base::Time* last_modified_time) {
- if (file_util::PathExists(filename)) {
+ if (base::PathExists(filename)) {
base::PlatformFileInfo info;
if (file_util::GetFileInfo(filename, &info))
*last_modified_time = info.last_modified;
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index f0f28b8..a470027 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -675,7 +675,7 @@ class ExtensionServiceTest
if (pem_path.value().empty()) {
pem_output_path = crx_path.DirName().AppendASCII("temp.pem");
} else {
- ASSERT_TRUE(file_util::PathExists(pem_path));
+ ASSERT_TRUE(base::PathExists(pem_path));
}
ASSERT_TRUE(base::Delete(crx_path, false));
@@ -687,7 +687,7 @@ class ExtensionServiceTest
pem_output_path,
ExtensionCreator::kOverwriteCRX));
- ASSERT_TRUE(file_util::PathExists(crx_path));
+ ASSERT_TRUE(base::PathExists(crx_path));
}
// Create a CrxInstaller and start installation. To allow the install
@@ -699,7 +699,7 @@ class ExtensionServiceTest
}
void StartCRXInstall(const base::FilePath& crx_path, int creation_flags) {
- ASSERT_TRUE(file_util::PathExists(crx_path))
+ ASSERT_TRUE(base::PathExists(crx_path))
<< "Path does not exist: "<< crx_path.value().c_str();
scoped_refptr<CrxInstaller> installer(CrxInstaller::Create(service_, NULL));
installer->set_creation_flags(creation_flags);
@@ -784,7 +784,7 @@ class ExtensionServiceTest
const Extension* InstallCRXWithLocation(const base::FilePath& crx_path,
Manifest::Location install_location,
InstallState install_state) {
- EXPECT_TRUE(file_util::PathExists(crx_path))
+ EXPECT_TRUE(base::PathExists(crx_path))
<< "Path does not exist: "<< crx_path.value().c_str();
// no client (silent install)
scoped_refptr<CrxInstaller> installer(CrxInstaller::Create(service_, NULL));
@@ -886,7 +886,7 @@ class ExtensionServiceTest
void UpdateExtension(const std::string& id, const base::FilePath& in_path,
UpdateState expected_state) {
- ASSERT_TRUE(file_util::PathExists(in_path));
+ ASSERT_TRUE(base::PathExists(in_path));
// We need to copy this to a temporary location because Update() will delete
// it.
@@ -938,7 +938,7 @@ class ExtensionServiceTest
}
// Update() should the temporary input file.
- EXPECT_FALSE(file_util::PathExists(path));
+ EXPECT_FALSE(base::PathExists(path));
}
void TerminateExtension(const std::string& id) {
@@ -963,7 +963,7 @@ class ExtensionServiceTest
void UninstallExtension(const std::string& id, bool use_helper) {
// Verify that the extension is installed.
base::FilePath extension_path = extensions_install_dir_.AppendASCII(id);
- EXPECT_TRUE(file_util::PathExists(extension_path));
+ EXPECT_TRUE(base::PathExists(extension_path));
size_t pref_key_count = GetPrefKeyCount();
EXPECT_GT(pref_key_count, 0u);
ValidateIntegerPref(id, "state", Extension::ENABLED);
@@ -994,7 +994,7 @@ class ExtensionServiceTest
loop_.RunUntilIdle();
// The directory should be gone.
- EXPECT_FALSE(file_util::PathExists(extension_path));
+ EXPECT_FALSE(base::PathExists(extension_path));
}
void ValidatePrefKeyCount(size_t count) {
@@ -1205,7 +1205,7 @@ void PackExtensionTestClient::OnPackSuccess(
base::MessageLoop::current()->Quit();
EXPECT_EQ(expected_crx_path_.value(), crx_path.value());
EXPECT_EQ(expected_private_key_path_.value(), private_key_path.value());
- ASSERT_TRUE(file_util::PathExists(private_key_path));
+ ASSERT_TRUE(base::PathExists(private_key_path));
}
// The tests are designed so that we never expect to see a packing error.
@@ -1410,7 +1410,7 @@ TEST_F(ExtensionServiceTest, CleanupOnStartup) {
// And extension1 dir should now be toast.
base::FilePath extension_dir = extensions_install_dir_
.AppendASCII("behllobkkfkfnphdnhnkndlbkcpglgmj");
- ASSERT_FALSE(file_util::PathExists(extension_dir));
+ ASSERT_FALSE(base::PathExists(extension_dir));
}
// Test that GarbageCollectExtensions deletes the right versions of an
@@ -1429,7 +1429,7 @@ TEST_F(ExtensionServiceTest, GarbageCollectWithPendingUpdates) {
// This is the directory that is going to be deleted, so make sure it actually
// is there before the garbage collection.
- ASSERT_TRUE(file_util::PathExists(extensions_install_dir_.AppendASCII(
+ ASSERT_TRUE(base::PathExists(extensions_install_dir_.AppendASCII(
"hpiknbiabeeppbpihjehijgoemciehgk/3")));
service_->GarbageCollectExtensions();
@@ -1438,13 +1438,13 @@ TEST_F(ExtensionServiceTest, GarbageCollectWithPendingUpdates) {
// Verify that the pending update for the first extension didn't get
// deleted.
- EXPECT_TRUE(file_util::PathExists(extensions_install_dir_.AppendASCII(
+ EXPECT_TRUE(base::PathExists(extensions_install_dir_.AppendASCII(
"bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0")));
- EXPECT_TRUE(file_util::PathExists(extensions_install_dir_.AppendASCII(
+ EXPECT_TRUE(base::PathExists(extensions_install_dir_.AppendASCII(
"bjafgdebaacbbbecmhlhpofkepfkgcpa/2.0")));
- EXPECT_TRUE(file_util::PathExists(extensions_install_dir_.AppendASCII(
+ EXPECT_TRUE(base::PathExists(extensions_install_dir_.AppendASCII(
"hpiknbiabeeppbpihjehijgoemciehgk/2")));
- EXPECT_FALSE(file_util::PathExists(extensions_install_dir_.AppendASCII(
+ EXPECT_FALSE(base::PathExists(extensions_install_dir_.AppendASCII(
"hpiknbiabeeppbpihjehijgoemciehgk/3")));
}
@@ -1463,7 +1463,7 @@ TEST_F(ExtensionServiceTest, UpdateOnStartup) {
// This is the directory that is going to be deleted, so make sure it actually
// is there before the garbage collection.
- ASSERT_TRUE(file_util::PathExists(extensions_install_dir_.AppendASCII(
+ ASSERT_TRUE(base::PathExists(extensions_install_dir_.AppendASCII(
"hpiknbiabeeppbpihjehijgoemciehgk/3")));
service_->Init();
@@ -1475,13 +1475,13 @@ TEST_F(ExtensionServiceTest, UpdateOnStartup) {
loop_.RunUntilIdle();
// Verify that the pending update for the first extension got installed.
- EXPECT_FALSE(file_util::PathExists(extensions_install_dir_.AppendASCII(
+ EXPECT_FALSE(base::PathExists(extensions_install_dir_.AppendASCII(
"bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0")));
- EXPECT_TRUE(file_util::PathExists(extensions_install_dir_.AppendASCII(
+ EXPECT_TRUE(base::PathExists(extensions_install_dir_.AppendASCII(
"bjafgdebaacbbbecmhlhpofkepfkgcpa/2.0")));
- EXPECT_TRUE(file_util::PathExists(extensions_install_dir_.AppendASCII(
+ EXPECT_TRUE(base::PathExists(extensions_install_dir_.AppendASCII(
"hpiknbiabeeppbpihjehijgoemciehgk/2")));
- EXPECT_FALSE(file_util::PathExists(extensions_install_dir_.AppendASCII(
+ EXPECT_FALSE(base::PathExists(extensions_install_dir_.AppendASCII(
"hpiknbiabeeppbpihjehijgoemciehgk/3")));
// Make sure update information got deleted.
@@ -1512,9 +1512,9 @@ TEST_F(ExtensionServiceTest, PendingImports) {
// These extensions are used by the extensions we test below, they must be
// installed.
- EXPECT_TRUE(file_util::PathExists(extensions_install_dir_.AppendASCII(
+ EXPECT_TRUE(base::PathExists(extensions_install_dir_.AppendASCII(
"bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0")));
- EXPECT_TRUE(file_util::PathExists(extensions_install_dir_.AppendASCII(
+ EXPECT_TRUE(base::PathExists(extensions_install_dir_.AppendASCII(
"hpiknbiabeeppbpihjehijgoemciehgk/2")));
// Each of these extensions should have been rejected because of dependencies
@@ -1539,7 +1539,7 @@ TEST_F(ExtensionServiceTest, PendingImports) {
EXPECT_EQ(ExtensionPrefs::DELAY_REASON_WAIT_FOR_IMPORTS,
prefs->GetDelayedInstallReason("behllobkkfkfnphdnhnkndlbkcpglgmj"));
- EXPECT_FALSE(file_util::PathExists(extensions_install_dir_.AppendASCII(
+ EXPECT_FALSE(base::PathExists(extensions_install_dir_.AppendASCII(
"behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0")));
EXPECT_TRUE(service_->pending_extension_manager()->HasPendingExtensions());
@@ -1801,7 +1801,7 @@ TEST_F(ExtensionServiceTest, InstallUserScript) {
base::FilePath path = data_dir_
.AppendASCII("user_script_basic.user.js");
- ASSERT_TRUE(file_util::PathExists(path));
+ ASSERT_TRUE(base::PathExists(path));
scoped_refptr<CrxInstaller> installer(CrxInstaller::Create(service_, NULL));
installer->set_allow_silent_install(true);
installer->InstallUserScript(
@@ -1851,8 +1851,8 @@ TEST_F(ExtensionServiceTest, GrantedPermissions) {
base::FilePath pem_path = path.AppendASCII("unknown.pem");
path = path.AppendASCII("unknown");
- ASSERT_TRUE(file_util::PathExists(pem_path));
- ASSERT_TRUE(file_util::PathExists(path));
+ ASSERT_TRUE(base::PathExists(pem_path));
+ ASSERT_TRUE(base::PathExists(path));
ExtensionPrefs* prefs = service_->extension_prefs();
@@ -1900,8 +1900,8 @@ TEST_F(ExtensionServiceTest, DefaultAppsGrantedPermissions) {
base::FilePath pem_path = path.AppendASCII("unknown.pem");
path = path.AppendASCII("unknown");
- ASSERT_TRUE(file_util::PathExists(pem_path));
- ASSERT_TRUE(file_util::PathExists(path));
+ ASSERT_TRUE(base::PathExists(pem_path));
+ ASSERT_TRUE(base::PathExists(path));
ExtensionPrefs* prefs = service_->extension_prefs();
@@ -1947,7 +1947,7 @@ TEST_F(ExtensionServiceTest, GrantedFullAccessPermissions) {
.AppendASCII(good1)
.AppendASCII("2");
- ASSERT_TRUE(file_util::PathExists(path));
+ ASSERT_TRUE(base::PathExists(path));
const Extension* extension = PackAndInstallCRX(path, INSTALL_NEW);
EXPECT_EQ(0u, GetErrors().size());
EXPECT_EQ(1u, service_->extensions()->size());
@@ -1975,7 +1975,7 @@ TEST_F(ExtensionServiceTest, GrantedAPIAndHostPermissions) {
.AppendASCII("permissions")
.AppendASCII("unknown");
- ASSERT_TRUE(file_util::PathExists(path));
+ ASSERT_TRUE(base::PathExists(path));
const Extension* extension = PackAndInstallCRX(path, INSTALL_NEW);
@@ -2086,8 +2086,8 @@ TEST_F(ExtensionServiceTest, PackExtension) {
scoped_ptr<ExtensionCreator> creator(new ExtensionCreator());
ASSERT_TRUE(creator->Run(input_directory, crx_path, base::FilePath(),
privkey_path, ExtensionCreator::kNoRunFlags));
- ASSERT_TRUE(file_util::PathExists(crx_path));
- ASSERT_TRUE(file_util::PathExists(privkey_path));
+ ASSERT_TRUE(base::PathExists(crx_path));
+ ASSERT_TRUE(base::PathExists(privkey_path));
// Repeat the run with the pem file gone, and no special flags
// Should refuse to overwrite the existing crx.
@@ -2104,7 +2104,7 @@ TEST_F(ExtensionServiceTest, PackExtension) {
ASSERT_FALSE(creator->Run(input_directory, crx_path, base::FilePath(),
privkey_path, ExtensionCreator::kOverwriteCRX));
- ASSERT_TRUE(file_util::PathExists(privkey_path));
+ ASSERT_TRUE(base::PathExists(privkey_path));
InstallCRX(crx_path, INSTALL_NEW);
// Try packing with invalid paths.
@@ -2225,8 +2225,8 @@ TEST_F(ExtensionServiceTest, PackExtensionContainingKeyFails) {
ASSERT_TRUE(creator->Run(input_directory, crx_path, base::FilePath(),
privkey_path, ExtensionCreator::kNoRunFlags))
<< creator->error_message();
- ASSERT_TRUE(file_util::PathExists(crx_path));
- ASSERT_TRUE(file_util::PathExists(privkey_path));
+ ASSERT_TRUE(base::PathExists(crx_path));
+ ASSERT_TRUE(base::PathExists(privkey_path));
base::Delete(crx_path, false);
// Move the pem file into the extension.
@@ -2256,7 +2256,7 @@ TEST_F(ExtensionServiceTest, PackExtensionOpenSSLKey) {
.AppendASCII("1.0.0.0");
base::FilePath privkey_path(data_dir_.AppendASCII(
"openssl_privkey_asn1.pem"));
- ASSERT_TRUE(file_util::PathExists(privkey_path));
+ ASSERT_TRUE(base::PathExists(privkey_path));
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
@@ -2330,7 +2330,7 @@ TEST_F(ExtensionServiceTest, LoadLocalizedTheme) {
// temporary directory, but it automatically installs to the extension's
// directory, and we don't want to copy the whole extension for a unittest.
base::FilePath theme_file = extension_path.Append(chrome::kThemePackFilename);
- ASSERT_TRUE(file_util::PathExists(theme_file));
+ ASSERT_TRUE(base::PathExists(theme_file));
ASSERT_TRUE(base::Delete(theme_file, false)); // Not recursive.
}
@@ -2353,8 +2353,8 @@ TEST_F(ExtensionServiceTest, UnpackedExtensionCanChangeID) {
AppendASCII("unpacked").
AppendASCII("manifest_with_key.json");
- ASSERT_TRUE(file_util::PathExists(manifest_no_key));
- ASSERT_TRUE(file_util::PathExists(manifest_with_key));
+ ASSERT_TRUE(base::PathExists(manifest_no_key));
+ ASSERT_TRUE(base::PathExists(manifest_with_key));
// Load the unpacked extension with no key.
base::CopyFile(manifest_no_key, manifest_path);
@@ -2387,9 +2387,9 @@ TEST_F(ExtensionServiceTest, UnpackedExtensionMayContainSymlinkedFiles) {
// Paths to test data files.
base::FilePath source_manifest = source_data_dir.AppendASCII("manifest.json");
- ASSERT_TRUE(file_util::PathExists(source_manifest));
+ ASSERT_TRUE(base::PathExists(source_manifest));
base::FilePath source_icon = source_data_dir.AppendASCII("icon.png");
- ASSERT_TRUE(file_util::PathExists(source_icon));
+ ASSERT_TRUE(base::PathExists(source_icon));
// Set up the temporary extension directory.
base::ScopedTempDir temp;
@@ -2842,7 +2842,7 @@ TEST_F(ExtensionServiceTest, LoadExtensionsCanDowngrade) {
base::FilePath extension_path = temp.path();
base::FilePath manifest_path =
extension_path.Append(extensions::kManifestFilename);
- ASSERT_FALSE(file_util::PathExists(manifest_path));
+ ASSERT_FALSE(base::PathExists(manifest_path));
// Start with version 2.0.
DictionaryValue manifest;
@@ -4061,7 +4061,7 @@ TEST_F(ExtensionServiceTest, ClearExtensionData) {
.AddExtension(FILE_PATH_LITERAL(".localstorage"));
EXPECT_TRUE(file_util::CreateDirectory(lso_dir_path));
EXPECT_EQ(0, file_util::WriteFile(lso_file_path, NULL, 0));
- EXPECT_TRUE(file_util::PathExists(lso_file_path));
+ EXPECT_TRUE(base::PathExists(lso_file_path));
// Create indexed db. Similarly, it is enough to only simulate this by
// creating the directory on the disk.
@@ -4092,7 +4092,7 @@ TEST_F(ExtensionServiceTest, ClearExtensionData) {
EXPECT_EQ(0U, origins.size());
// Check that the LSO file has been removed.
- EXPECT_FALSE(file_util::PathExists(lso_file_path));
+ EXPECT_FALSE(base::PathExists(lso_file_path));
// Check if the indexed db has disappeared too.
EXPECT_FALSE(file_util::DirectoryExists(idb_path));
@@ -4178,7 +4178,7 @@ TEST_F(ExtensionServiceTest, ClearAppData) {
.AddExtension(FILE_PATH_LITERAL(".localstorage"));
EXPECT_TRUE(file_util::CreateDirectory(lso_dir_path));
EXPECT_EQ(0, file_util::WriteFile(lso_file_path, NULL, 0));
- EXPECT_TRUE(file_util::PathExists(lso_file_path));
+ EXPECT_TRUE(base::PathExists(lso_file_path));
// Create indexed db. Similarly, it is enough to only simulate this by
// creating the directory on the disk.
@@ -4226,7 +4226,7 @@ TEST_F(ExtensionServiceTest, ClearAppData) {
EXPECT_EQ(0U, origins.size());
// Check that the LSO file has been removed.
- EXPECT_FALSE(file_util::PathExists(lso_file_path));
+ EXPECT_FALSE(base::PathExists(lso_file_path));
// Check if the indexed db has disappeared too.
EXPECT_FALSE(file_util::DirectoryExists(idb_path));
@@ -4363,10 +4363,10 @@ void ExtensionServiceTest::TestExternalProvider(
base::FilePath install_path = extensions_install_dir_.AppendASCII(id);
if (no_uninstall) {
// Policy controlled extensions should not have been touched by uninstall.
- ASSERT_TRUE(file_util::PathExists(install_path));
+ ASSERT_TRUE(base::PathExists(install_path));
} else {
// The extension should also be gone from the install directory.
- ASSERT_FALSE(file_util::PathExists(install_path));
+ ASSERT_FALSE(base::PathExists(install_path));
loaded_.clear();
service_->CheckForExternalUpdates();
loop_.RunUntilIdle();
@@ -4404,7 +4404,7 @@ void ExtensionServiceTest::TestExternalProvider(
ValidatePrefKeyCount(0);
// The extension should also be gone from the install directory.
- ASSERT_FALSE(file_util::PathExists(install_path));
+ ASSERT_FALSE(base::PathExists(install_path));
// Now test the case where user uninstalls and then the extension is removed
// from the external provider.
diff --git a/chrome/browser/extensions/external_pref_loader.cc b/chrome/browser/extensions/external_pref_loader.cc
index 849829a..567fdb2 100644
--- a/chrome/browser/extensions/external_pref_loader.cc
+++ b/chrome/browser/extensions/external_pref_loader.cc
@@ -31,7 +31,7 @@ std::set<base::FilePath> GetPrefsCandidateFilesFromFolder(
std::set<base::FilePath> external_extension_paths;
- if (!file_util::PathExists(external_extension_search_path)) {
+ if (!base::PathExists(external_extension_search_path)) {
// Does not have to exist.
return external_extension_paths;
}
@@ -156,7 +156,7 @@ void ExternalPrefLoader::ReadExternalExtensionPrefFile(DictionaryValue* prefs) {
base::FilePath json_file = base_path_.Append(kExternalExtensionJson);
- if (!file_util::PathExists(json_file)) {
+ if (!base::PathExists(json_file)) {
// This is not an error. The file does not exist by default.
return;
}
diff --git a/chrome/browser/extensions/external_registry_loader_win.cc b/chrome/browser/extensions/external_registry_loader_win.cc
index 47cf902..cf446c0 100644
--- a/chrome/browser/extensions/external_registry_loader_win.cc
+++ b/chrome/browser/extensions/external_registry_loader_win.cc
@@ -100,7 +100,7 @@ void ExternalRegistryLoader::LoadOnFileThread() {
continue;
}
- if (!file_util::PathExists(extension_path)) {
+ if (!base::PathExists(extension_path)) {
LOG(ERROR) << "File " << extension_path_str
<< " for key " << key_path
<< " does not exist or is not readable.";
diff --git a/chrome/browser/extensions/platform_app_launcher.cc b/chrome/browser/extensions/platform_app_launcher.cc
index 03d914b..c6c862cb 100644
--- a/chrome/browser/extensions/platform_app_launcher.cc
+++ b/chrome/browser/extensions/platform_app_launcher.cc
@@ -146,7 +146,7 @@ class PlatformAppPathLauncher
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// If the file doesn't exist, or is a directory, launch with no launch data.
- if (!file_util::PathExists(file_path_) ||
+ if (!base::PathExists(file_path_) ||
file_util::DirectoryExists(file_path_)) {
LOG(WARNING) << "No file exists with path " << file_path_.value();
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind(
diff --git a/chrome/browser/extensions/sandboxed_unpacker_unittest.cc b/chrome/browser/extensions/sandboxed_unpacker_unittest.cc
index a5cccb4..7e0477f 100644
--- a/chrome/browser/extensions/sandboxed_unpacker_unittest.cc
+++ b/chrome/browser/extensions/sandboxed_unpacker_unittest.cc
@@ -79,7 +79,7 @@ class SandboxedUnpackerTest : public testing::Test {
original_path = original_path.AppendASCII("extensions")
.AppendASCII("unpacker")
.AppendASCII(crx_name);
- ASSERT_TRUE(file_util::PathExists(original_path)) << original_path.value();
+ ASSERT_TRUE(base::PathExists(original_path)) << original_path.value();
sandboxed_unpacker_ = new SandboxedUnpacker(
original_path,
@@ -112,7 +112,7 @@ TEST_F(SandboxedUnpackerTest, NoCatalogsSuccess) {
// Check that there is no _locales folder.
base::FilePath install_path =
GetInstallPath().Append(kLocaleFolder);
- EXPECT_FALSE(file_util::PathExists(install_path));
+ EXPECT_FALSE(base::PathExists(install_path));
}
TEST_F(SandboxedUnpackerTest, WithCatalogsSuccess) {
@@ -120,7 +120,7 @@ TEST_F(SandboxedUnpackerTest, WithCatalogsSuccess) {
// Check that there is _locales folder.
base::FilePath install_path =
GetInstallPath().Append(kLocaleFolder);
- EXPECT_TRUE(file_util::PathExists(install_path));
+ EXPECT_TRUE(base::PathExists(install_path));
}
} // namespace extensions
diff --git a/chrome/browser/extensions/test_extension_dir.cc b/chrome/browser/extensions/test_extension_dir.cc
index 9c1ed76..039fbe8 100644
--- a/chrome/browser/extensions/test_extension_dir.cc
+++ b/chrome/browser/extensions/test_extension_dir.cc
@@ -45,7 +45,7 @@ base::FilePath TestExtensionDir::Pack() {
base::FilePath pem_path =
crx_dir_.path().Append(FILE_PATH_LITERAL("ext.pem"));
base::FilePath pem_in_path, pem_out_path;
- if (file_util::PathExists(pem_path))
+ if (base::PathExists(pem_path))
pem_in_path = pem_path;
else
pem_out_path = pem_path;
@@ -58,7 +58,7 @@ base::FilePath TestExtensionDir::Pack() {
<< "ExtensionCreator::Run() failed: " << creator.error_message();
return base::FilePath();
}
- if (!file_util::PathExists(crx_path)) {
+ if (!base::PathExists(crx_path)) {
ADD_FAILURE() << crx_path.value() << " was not created.";
return base::FilePath();
}
diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc
index 18d899a..b797337 100644
--- a/chrome/browser/extensions/user_script_listener_unittest.cc
+++ b/chrome/browser/extensions/user_script_listener_unittest.cc
@@ -79,7 +79,7 @@ class SimpleTestJob : public net::URLRequestTestJob {
// Yoinked from extension_manifest_unittest.cc.
DictionaryValue* LoadManifestFile(const base::FilePath path,
std::string* error) {
- EXPECT_TRUE(file_util::PathExists(path));
+ EXPECT_TRUE(base::PathExists(path));
JSONFileValueSerializer serializer(path);
return static_cast<DictionaryValue*>(serializer.Deserialize(NULL, error));
}
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc
index 86011c8..effb63d 100644
--- a/chrome/browser/first_run/first_run.cc
+++ b/chrome/browser/first_run/first_run.cc
@@ -169,7 +169,7 @@ base::FilePath GetDefaultPrefFilePath(bool create_profile_dir,
base::FilePath default_pref_dir =
ProfileManager::GetDefaultProfileDir(user_data_dir);
if (create_profile_dir) {
- if (!file_util::PathExists(default_pref_dir)) {
+ if (!base::PathExists(default_pref_dir)) {
if (!file_util::CreateDirectory(default_pref_dir))
return base::FilePath();
}
@@ -470,7 +470,7 @@ bool IsChromeFirstRun() {
base::FilePath first_run_sentinel;
if (!internal::GetFirstRunSentinelFilePath(&first_run_sentinel) ||
- file_util::PathExists(first_run_sentinel)) {
+ base::PathExists(first_run_sentinel)) {
internal::first_run_ = internal::FIRST_RUN_FALSE;
return false;
}
@@ -677,7 +677,7 @@ void AutoImport(
base::FilePath local_state_path;
PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path);
- bool local_state_file_exists = file_util::PathExists(local_state_path);
+ bool local_state_file_exists = base::PathExists(local_state_path);
scoped_refptr<ImporterList> importer_list(new ImporterList());
importer_list->DetectSourceProfilesHack(
diff --git a/chrome/browser/first_run/first_run_internal_posix.cc b/chrome/browser/first_run/first_run_internal_posix.cc
index ce26df8..51f942a 100644
--- a/chrome/browser/first_run/first_run_internal_posix.cc
+++ b/chrome/browser/first_run/first_run_internal_posix.cc
@@ -28,7 +28,7 @@ void DoPostImportPlatformSpecificTasks(Profile* profile) {
#if !defined(USE_AURA)
base::FilePath local_state_path;
PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path);
- bool local_state_file_exists = file_util::PathExists(local_state_path);
+ bool local_state_file_exists = base::PathExists(local_state_path);
// Launch the first run dialog only for certain builds, and only if the user
// has not already set preferences.
if (internal::IsOrganicFirstRun() && !local_state_file_exists) {
diff --git a/chrome/browser/first_run/first_run_internal_win.cc b/chrome/browser/first_run/first_run_internal_win.cc
index bc46456..5cb5228 100644
--- a/chrome/browser/first_run/first_run_internal_win.cc
+++ b/chrome/browser/first_run/first_run_internal_win.cc
@@ -112,7 +112,7 @@ bool IsEULANotAccepted(installer::MasterPreferences* install_prefs) {
// Be conservative and show the EULA if the path to the sentinel can't be
// determined.
if (!GetEULASentinelFilePath(&eula_sentinel) ||
- !file_util::PathExists(eula_sentinel)) {
+ !base::PathExists(eula_sentinel)) {
return true;
}
}
diff --git a/chrome/browser/first_run/first_run_unittest.cc b/chrome/browser/first_run/first_run_unittest.cc
index 8cd1edf..0e0edcb 100644
--- a/chrome/browser/first_run/first_run_unittest.cc
+++ b/chrome/browser/first_run/first_run_unittest.cc
@@ -34,10 +34,10 @@ class FirstRunTest : public testing::Test {
TEST_F(FirstRunTest, RemoveSentinel) {
EXPECT_TRUE(CreateSentinel());
- EXPECT_TRUE(file_util::PathExists(sentinel_path_));
+ EXPECT_TRUE(base::PathExists(sentinel_path_));
EXPECT_TRUE(RemoveSentinel());
- EXPECT_FALSE(file_util::PathExists(sentinel_path_));
+ EXPECT_FALSE(base::PathExists(sentinel_path_));
}
TEST_F(FirstRunTest, SetupMasterPrefsFromInstallPrefs_VariationsSeed) {
diff --git a/chrome/browser/first_run/upgrade_util_win.cc b/chrome/browser/first_run/upgrade_util_win.cc
index 23b9067..c669aa0 100644
--- a/chrome/browser/first_run/upgrade_util_win.cc
+++ b/chrome/browser/first_run/upgrade_util_win.cc
@@ -174,14 +174,14 @@ bool IsUpdatePendingRestart() {
base::FilePath new_chrome_exe;
if (!GetNewerChromeFile(&new_chrome_exe))
return false;
- return file_util::PathExists(new_chrome_exe);
+ return base::PathExists(new_chrome_exe);
}
bool SwapNewChromeExeIfPresent() {
base::FilePath new_chrome_exe;
if (!GetNewerChromeFile(&new_chrome_exe))
return false;
- if (!file_util::PathExists(new_chrome_exe))
+ if (!base::PathExists(new_chrome_exe))
return false;
base::FilePath cur_chrome_exe;
if (!PathService::Get(base::FILE_EXE, &cur_chrome_exe))
diff --git a/chrome/browser/google/google_update_settings_posix.cc b/chrome/browser/google/google_update_settings_posix.cc
index c4bd2cd..c253421 100644
--- a/chrome/browser/google/google_update_settings_posix.cc
+++ b/chrome/browser/google/google_update_settings_posix.cc
@@ -42,8 +42,8 @@ bool GoogleUpdateSettings::SetCollectStatsConsent(bool consented) {
base::FilePath consent_file = consent_dir.AppendASCII(kConsentToSendStats);
if (consented) {
- if ((!file_util::PathExists(consent_file)) ||
- (file_util::PathExists(consent_file) &&
+ if ((!base::PathExists(consent_file)) ||
+ (base::PathExists(consent_file) &&
!google_update::posix_guid().empty())) {
const char* c_str = google_update::posix_guid().c_str();
int size = google_update::posix_guid().size();
diff --git a/chrome/browser/history/android/android_provider_backend_unittest.cc b/chrome/browser/history/android/android_provider_backend_unittest.cc
index 74f2200..06059a7 100644
--- a/chrome/browser/history/android/android_provider_backend_unittest.cc
+++ b/chrome/browser/history/android/android_provider_backend_unittest.cc
@@ -262,8 +262,8 @@ TEST_F(AndroidProviderBackendTest, UpdateTables) {
// The history_db_name and thumbnail_db_name files should be created by
// HistoryBackend. We need to open the same database files.
- ASSERT_TRUE(file_util::PathExists(history_db_name_));
- ASSERT_TRUE(file_util::PathExists(thumbnail_db_name_));
+ ASSERT_TRUE(base::PathExists(history_db_name_));
+ ASSERT_TRUE(base::PathExists(thumbnail_db_name_));
ASSERT_EQ(sql::INIT_OK, history_db_.Init(history_db_name_));
ASSERT_EQ(sql::INIT_OK, thumbnail_db_.Init(thumbnail_db_name_, NULL,
@@ -412,8 +412,8 @@ TEST_F(AndroidProviderBackendTest, QueryHistoryAndBookmarks) {
// The history_db_name and thumbnail_db_name files should be created by
// HistoryBackend. We need to open the same database files.
- ASSERT_TRUE(file_util::PathExists(history_db_name_));
- ASSERT_TRUE(file_util::PathExists(thumbnail_db_name_));
+ ASSERT_TRUE(base::PathExists(history_db_name_));
+ ASSERT_TRUE(base::PathExists(thumbnail_db_name_));
ASSERT_EQ(sql::INIT_OK, history_db_.Init(history_db_name_));
ASSERT_EQ(sql::INIT_OK, thumbnail_db_.Init(thumbnail_db_name_, NULL,
@@ -1826,8 +1826,8 @@ TEST_F(AndroidProviderBackendTest, QueryWithoutThumbnailDB) {
// The history_db_name and thumbnail_db_name files should be created by
// HistoryBackend. We need to open the same database files.
- ASSERT_TRUE(file_util::PathExists(history_db_name_));
- ASSERT_TRUE(file_util::PathExists(thumbnail_db_name_));
+ ASSERT_TRUE(base::PathExists(history_db_name_));
+ ASSERT_TRUE(base::PathExists(thumbnail_db_name_));
// Only creates the history database
ASSERT_EQ(sql::INIT_OK, history_db_.Init(history_db_name_));
diff --git a/chrome/browser/history/in_memory_url_index_unittest.cc b/chrome/browser/history/in_memory_url_index_unittest.cc
index 8a2d1de..6fa5d71 100644
--- a/chrome/browser/history/in_memory_url_index_unittest.cc
+++ b/chrome/browser/history/in_memory_url_index_unittest.cc
@@ -203,7 +203,7 @@ void InMemoryURLIndexTest::SetUp() {
history_proto_path = history_proto_path.Append(
FILE_PATH_LITERAL("History"));
history_proto_path = history_proto_path.Append(TestDBName());
- EXPECT_TRUE(file_util::PathExists(history_proto_path));
+ EXPECT_TRUE(base::PathExists(history_proto_path));
std::ifstream proto_file(history_proto_path.value().c_str());
static const size_t kCommandBufferMaxSize = 2048;
diff --git a/chrome/browser/history/text_database.cc b/chrome/browser/history/text_database.cc
index 7353174..0f5db89 100644
--- a/chrome/browser/history/text_database.cc
+++ b/chrome/browser/history/text_database.cc
@@ -127,7 +127,7 @@ TextDatabase::DBIdent TextDatabase::FileNameToID(
bool TextDatabase::Init() {
// Make sure, if we're not allowed to create the file, that it exists.
if (!allow_create_) {
- if (!file_util::PathExists(file_name_))
+ if (!base::PathExists(file_name_))
return false;
}
diff --git a/chrome/browser/history/top_sites_database.cc b/chrome/browser/history/top_sites_database.cc
index cf4220d..6192a87 100644
--- a/chrome/browser/history/top_sites_database.cc
+++ b/chrome/browser/history/top_sites_database.cc
@@ -25,7 +25,7 @@ TopSitesDatabase::~TopSitesDatabase() {
}
bool TopSitesDatabase::Init(const base::FilePath& db_name) {
- bool file_existed = file_util::PathExists(db_name);
+ bool file_existed = base::PathExists(db_name);
if (!file_existed)
may_need_history_migration_ = true;
diff --git a/chrome/browser/history/top_sites_impl_unittest.cc b/chrome/browser/history/top_sites_impl_unittest.cc
index 566e8e9..e97a8d4 100644
--- a/chrome/browser/history/top_sites_impl_unittest.cc
+++ b/chrome/browser/history/top_sites_impl_unittest.cc
@@ -910,7 +910,7 @@ TEST_F(TopSitesMigrationTest, Migrate) {
WaitForHistory();
// Make sure there is no longer a Thumbnails file on disk.
- ASSERT_FALSE(file_util::PathExists(
+ ASSERT_FALSE(base::PathExists(
profile()->GetPath().Append(chrome::kThumbnailsFilename)));
// Recreate top sites and make sure everything is still there.
diff --git a/chrome/browser/history/top_sites_likely_impl_unittest.cc b/chrome/browser/history/top_sites_likely_impl_unittest.cc
index 14529ca..4bd3c85 100644
--- a/chrome/browser/history/top_sites_likely_impl_unittest.cc
+++ b/chrome/browser/history/top_sites_likely_impl_unittest.cc
@@ -911,7 +911,7 @@ TEST_F(TopSitesLikelyMigrationTest, Migrate) {
WaitForHistory();
// Make sure there is no longer a Thumbnails file on disk.
- ASSERT_FALSE(file_util::PathExists(
+ ASSERT_FALSE(base::PathExists(
profile()->GetPath().Append(chrome::kThumbnailsFilename)));
// Recreate top sites and make sure everything is still there.
diff --git a/chrome/browser/history/url_index_private_data.cc b/chrome/browser/history/url_index_private_data.cc
index 3315adb6..d4548cb 100644
--- a/chrome/browser/history/url_index_private_data.cc
+++ b/chrome/browser/history/url_index_private_data.cc
@@ -396,7 +396,7 @@ scoped_refptr<URLIndexPrivateData> URLIndexPrivateData::RestoreFromFile(
const base::FilePath& file_path,
const std::string& languages) {
base::TimeTicks beginning_time = base::TimeTicks::Now();
- if (!file_util::PathExists(file_path))
+ if (!base::PathExists(file_path))
return NULL;
std::string data;
// If there is no cache file then simply give up. This will cause us to
diff --git a/chrome/browser/importer/firefox3_importer.cc b/chrome/browser/importer/firefox3_importer.cc
index d8cc90c..1cfdbce 100644
--- a/chrome/browser/importer/firefox3_importer.cc
+++ b/chrome/browser/importer/firefox3_importer.cc
@@ -131,7 +131,7 @@ void Firefox3Importer::StartImport(
void Firefox3Importer::ImportHistory() {
base::FilePath file = source_path_.AppendASCII("places.sqlite");
- if (!file_util::PathExists(file))
+ if (!base::PathExists(file))
return;
sql::Connection db;
@@ -175,7 +175,7 @@ void Firefox3Importer::ImportHistory() {
void Firefox3Importer::ImportBookmarks() {
base::FilePath file = source_path_.AppendASCII("places.sqlite");
- if (!file_util::PathExists(file))
+ if (!base::PathExists(file))
return;
sql::Connection db;
@@ -333,13 +333,13 @@ void Firefox3Importer::ImportPasswords() {
std::vector<content::PasswordForm> forms;
base::FilePath source_path = source_path_;
base::FilePath file = source_path.AppendASCII("signons.sqlite");
- if (file_util::PathExists(file)) {
+ if (base::PathExists(file)) {
// Since Firefox 3.1, passwords are in signons.sqlite db.
decryptor.ReadAndParseSignons(file, &forms);
} else {
// Firefox 3.0 uses signons3.txt to store the passwords.
file = source_path.AppendASCII("signons3.txt");
- if (!file_util::PathExists(file))
+ if (!base::PathExists(file))
file = source_path.AppendASCII("signons2.txt");
std::string content;
@@ -371,7 +371,7 @@ void Firefox3Importer::ImportHomepage() {
void Firefox3Importer::GetSearchEnginesXMLData(
std::vector<std::string>* search_engine_data) {
base::FilePath file = source_path_.AppendASCII("search.sqlite");
- if (!file_util::PathExists(file))
+ if (!base::PathExists(file))
return;
sql::Connection db;
diff --git a/chrome/browser/importer/firefox_importer_browsertest.cc b/chrome/browser/importer/firefox_importer_browsertest.cc
index e8d854d..688c2c2 100644
--- a/chrome/browser/importer/firefox_importer_browsertest.cc
+++ b/chrome/browser/importer/firefox_importer_browsertest.cc
@@ -248,7 +248,7 @@ class FirefoxProfileImporterBrowserTest : public InProcessBrowserTest {
if (import_search_plugins) {
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path));
data_path = data_path.AppendASCII("firefox3_searchplugins");
- if (!file_util::PathExists(data_path)) {
+ if (!base::PathExists(data_path)) {
// TODO(maruel): Create search test data that we can open source!
LOG(ERROR) << L"Missing internal test data";
return;
diff --git a/chrome/browser/importer/firefox_importer_utils.cc b/chrome/browser/importer/firefox_importer_utils.cc
index 5610f5b..782e1fa 100644
--- a/chrome/browser/importer/firefox_importer_utils.cc
+++ b/chrome/browser/importer/firefox_importer_utils.cc
@@ -321,7 +321,7 @@ std::string GetPrefsJsValue(const std::string& content,
string16 GetFirefoxImporterName(const base::FilePath& app_path) {
const base::FilePath app_ini_file = app_path.AppendASCII("application.ini");
std::string branding_name;
- if (file_util::PathExists(app_ini_file)) {
+ if (base::PathExists(app_ini_file)) {
std::string content;
file_util::ReadFileToString(app_ini_file, &content);
std::vector<std::string> lines;
diff --git a/chrome/browser/importer/firefox_importer_utils_linux.cc b/chrome/browser/importer/firefox_importer_utils_linux.cc
index 98f9c2a4..0162d05 100644
--- a/chrome/browser/importer/firefox_importer_utils_linux.cc
+++ b/chrome/browser/importer/firefox_importer_utils_linux.cc
@@ -14,7 +14,7 @@ base::FilePath GetProfilesINI() {
if (!home.empty()) {
ini_file = home.Append(".mozilla/firefox/profiles.ini");
}
- if (file_util::PathExists(ini_file))
+ if (base::PathExists(ini_file))
return ini_file;
return base::FilePath();
diff --git a/chrome/browser/importer/firefox_importer_utils_mac.mm b/chrome/browser/importer/firefox_importer_utils_mac.mm
index 6aa9040..10171fd 100644
--- a/chrome/browser/importer/firefox_importer_utils_mac.mm
+++ b/chrome/browser/importer/firefox_importer_utils_mac.mm
@@ -18,7 +18,7 @@ base::FilePath GetProfilesINI() {
}
base::FilePath ini_file =
app_data_path.Append("Firefox").Append("profiles.ini");
- if (!file_util::PathExists(ini_file)) {
+ if (!base::PathExists(ini_file)) {
return base::FilePath();
}
return ini_file;
diff --git a/chrome/browser/importer/firefox_importer_utils_win.cc b/chrome/browser/importer/firefox_importer_utils_win.cc
index 68a4453..638deb2 100644
--- a/chrome/browser/importer/firefox_importer_utils_win.cc
+++ b/chrome/browser/importer/firefox_importer_utils_win.cc
@@ -78,5 +78,5 @@ base::FilePath GetProfilesINI() {
ini_file = ini_file.AppendASCII("Firefox");
ini_file = ini_file.AppendASCII("profiles.ini");
- return file_util::PathExists(ini_file) ? ini_file : base::FilePath();
+ return base::PathExists(ini_file) ? ini_file : base::FilePath();
}
diff --git a/chrome/browser/importer/firefox_profile_lock_unittest.cc b/chrome/browser/importer/firefox_profile_lock_unittest.cc
index 7506a71..95a4b4b 100644
--- a/chrome/browser/importer/firefox_profile_lock_unittest.cc
+++ b/chrome/browser/importer/firefox_profile_lock_unittest.cc
@@ -39,27 +39,27 @@ TEST_F(FirefoxProfileLockTest, ProfileLock) {
scoped_ptr<FirefoxProfileLock> lock;
EXPECT_EQ(static_cast<FirefoxProfileLock*>(NULL), lock.get());
- EXPECT_FALSE(file_util::PathExists(lock_file_path));
+ EXPECT_FALSE(base::PathExists(lock_file_path));
lock.reset(new FirefoxProfileLock(test_path));
EXPECT_TRUE(lock->HasAcquired());
- EXPECT_TRUE(file_util::PathExists(lock_file_path));
+ EXPECT_TRUE(base::PathExists(lock_file_path));
lock->Unlock();
EXPECT_FALSE(lock->HasAcquired());
// In the posix code, we don't delete the file when releasing the lock.
#if !defined(OS_POSIX)
- EXPECT_FALSE(file_util::PathExists(lock_file_path));
+ EXPECT_FALSE(base::PathExists(lock_file_path));
#endif // !defined(OS_POSIX)
lock->Lock();
EXPECT_TRUE(lock->HasAcquired());
- EXPECT_TRUE(file_util::PathExists(lock_file_path));
+ EXPECT_TRUE(base::PathExists(lock_file_path));
lock->Lock();
EXPECT_TRUE(lock->HasAcquired());
lock->Unlock();
EXPECT_FALSE(lock->HasAcquired());
// In the posix code, we don't delete the file when releasing the lock.
#if !defined(OS_POSIX)
- EXPECT_FALSE(file_util::PathExists(lock_file_path));
+ EXPECT_FALSE(base::PathExists(lock_file_path));
#endif // !defined(OS_POSIX)
}
@@ -74,7 +74,7 @@ TEST_F(FirefoxProfileLockTest, ProfileLockOrphaned) {
FILE* lock_file = file_util::OpenFile(lock_file_path, "w");
ASSERT_TRUE(lock_file);
file_util::CloseFile(lock_file);
- EXPECT_TRUE(file_util::PathExists(lock_file_path));
+ EXPECT_TRUE(base::PathExists(lock_file_path));
scoped_ptr<FirefoxProfileLock> lock;
EXPECT_EQ(static_cast<FirefoxProfileLock*>(NULL), lock.get());
diff --git a/chrome/browser/importer/safari_importer.mm b/chrome/browser/importer/safari_importer.mm
index 7bb0cd4..eb04d67 100644
--- a/chrome/browser/importer/safari_importer.mm
+++ b/chrome/browser/importer/safari_importer.mm
@@ -61,9 +61,9 @@ bool SafariImporter::CanImport(const base::FilePath& library_dir,
base::FilePath bookmarks_path = safari_dir.Append("Bookmarks.plist");
base::FilePath history_path = safari_dir.Append("History.plist");
- if (file_util::PathExists(bookmarks_path))
+ if (base::PathExists(bookmarks_path))
*services_supported |= importer::FAVORITES;
- if (file_util::PathExists(history_path))
+ if (base::PathExists(history_path))
*services_supported |= importer::HISTORY;
return *services_supported != importer::NONE;
diff --git a/chrome/browser/importer/safari_importer_unittest.mm b/chrome/browser/importer/safari_importer_unittest.mm
index 93e110c..a5aae66 100644
--- a/chrome/browser/importer/safari_importer_unittest.mm
+++ b/chrome/browser/importer/safari_importer_unittest.mm
@@ -37,7 +37,7 @@ class SafariImporterTest : public PlatformTest {
public:
SafariImporter* GetSafariImporter() {
base::FilePath test_library_dir = GetTestSafariLibraryPath();
- CHECK(file_util::PathExists(test_library_dir)) <<
+ CHECK(base::PathExists(test_library_dir)) <<
"Missing test data directory";
return new SafariImporter(test_library_dir);
diff --git a/chrome/browser/jumplist_win.cc b/chrome/browser/jumplist_win.cc
index 4447141..ca3a75e 100644
--- a/chrome/browser/jumplist_win.cc
+++ b/chrome/browser/jumplist_win.cc
@@ -735,7 +735,7 @@ void JumpList::RunUpdate() {
// icon directory, and create a new directory which contains new JumpList
// icon files.
base::FilePath icon_dir_old(icon_dir_.value() + L"Old");
- if (file_util::PathExists(icon_dir_old))
+ if (base::PathExists(icon_dir_old))
base::Delete(icon_dir_old, true);
base::Move(icon_dir_, icon_dir_old);
file_util::CreateDirectory(icon_dir_);
diff --git a/chrome/browser/mac/master_prefs.mm b/chrome/browser/mac/master_prefs.mm
index 2355b2c..cd22a67 100644
--- a/chrome/browser/mac/master_prefs.mm
+++ b/chrome/browser/mac/master_prefs.mm
@@ -45,7 +45,7 @@ base::FilePath MasterPrefsPath() {
if (chrome::GetDefaultUserDataDirectory(&user_application_support_path)) {
user_application_support_path =
user_application_support_path.Append(kMasterPreferencesFileName);
- if (file_util::PathExists(user_application_support_path))
+ if (base::PathExists(user_application_support_path))
return user_application_support_path;
}
diff --git a/chrome/browser/media/chrome_webrtc_browsertest.cc b/chrome/browser/media/chrome_webrtc_browsertest.cc
index bf74bf7..0fd01fa 100644
--- a/chrome/browser/media/chrome_webrtc_browsertest.cc
+++ b/chrome/browser/media/chrome_webrtc_browsertest.cc
@@ -239,7 +239,7 @@ class WebrtcBrowserTest : public InProcessBrowserTest {
EXPECT_TRUE(PathService::Get(base::DIR_MODULE, &peerconnection_server));
peerconnection_server = peerconnection_server.Append(kPeerConnectionServer);
- EXPECT_TRUE(file_util::PathExists(peerconnection_server)) <<
+ EXPECT_TRUE(base::PathExists(peerconnection_server)) <<
"Missing peerconnection_server. You must build "
"it so it ends up next to the browser test binary.";
EXPECT_TRUE(base::LaunchProcess(
diff --git a/chrome/browser/media/chrome_webrtc_video_quality_browsertest.cc b/chrome/browser/media/chrome_webrtc_video_quality_browsertest.cc
index 8dd7d18..c6036a8 100644
--- a/chrome/browser/media/chrome_webrtc_video_quality_browsertest.cc
+++ b/chrome/browser/media/chrome_webrtc_video_quality_browsertest.cc
@@ -109,12 +109,12 @@ class WebrtcVideoQualityBrowserTest : public InProcessBrowserTest {
InProcessBrowserTest::SetUp();
// Ensure we have the stuff we need.
- EXPECT_TRUE(file_util::PathExists(GetWorkingDir()))
+ EXPECT_TRUE(base::PathExists(GetWorkingDir()))
<< "Cannot find the working directory for the reference video and "
"the temporary files:" << GetWorkingDir().value();
base::FilePath reference_file =
GetWorkingDir().Append(kReferenceYuvFileName);
- EXPECT_TRUE(file_util::PathExists(reference_file))
+ EXPECT_TRUE(base::PathExists(reference_file))
<< "Cannot find the reference file to be used for video quality "
<< "comparison: " << reference_file.value();
}
@@ -144,9 +144,9 @@ class WebrtcVideoQualityBrowserTest : public InProcessBrowserTest {
base::FilePath path_to_data_handler =
GetSourceDir().Append(FILE_PATH_LITERAL("chrome/test/functional"));
- EXPECT_TRUE(file_util::PathExists(pywebsocket_server))
+ EXPECT_TRUE(base::PathExists(pywebsocket_server))
<< "Fatal: missing pywebsocket server.";
- EXPECT_TRUE(file_util::PathExists(path_to_data_handler))
+ EXPECT_TRUE(base::PathExists(path_to_data_handler))
<< "Fatal: missing data handler for pywebsocket server.";
AppendToPythonPath(path_pywebsocket_dir);
@@ -277,7 +277,7 @@ class WebrtcVideoQualityBrowserTest : public InProcessBrowserTest {
const base::FilePath& captured_video_filename) {
base::FilePath path_to_converter = base::MakeAbsoluteFilePath(
GetBrowserDir().Append(kArgbToI420ConverterExecutable));
- EXPECT_TRUE(file_util::PathExists(path_to_converter))
+ EXPECT_TRUE(base::PathExists(path_to_converter))
<< "Missing ARGB->I420 converter: should be in "
<< path_to_converter.value();
@@ -315,9 +315,9 @@ class WebrtcVideoQualityBrowserTest : public InProcessBrowserTest {
base::FilePath path_to_compare_script = GetSourceDir().Append(
FILE_PATH_LITERAL("third_party/webrtc/tools/compare_videos.py"));
- EXPECT_TRUE(file_util::PathExists(path_to_analyzer))
+ EXPECT_TRUE(base::PathExists(path_to_analyzer))
<< "Missing frame analyzer: should be in " << path_to_analyzer.value();
- EXPECT_TRUE(file_util::PathExists(path_to_compare_script))
+ EXPECT_TRUE(base::PathExists(path_to_compare_script))
<< "Missing video compare script: should be in "
<< path_to_compare_script.value();
@@ -427,7 +427,7 @@ class WebrtcVideoQualityBrowserTest : public InProcessBrowserTest {
base::FilePath peerconnection_server =
GetBrowserDir().Append(kPeerConnectionServer);
- EXPECT_TRUE(file_util::PathExists(peerconnection_server))
+ EXPECT_TRUE(base::PathExists(peerconnection_server))
<< "Missing peerconnection_server. You must build "
"it so it ends up next to the browser test binary.";
EXPECT_TRUE(base::LaunchProcess(CommandLine(peerconnection_server),
diff --git a/chrome/browser/media/webrtc_log_uploader.cc b/chrome/browser/media/webrtc_log_uploader.cc
index 81969ae..d9893b8 100644
--- a/chrome/browser/media/webrtc_log_uploader.cc
+++ b/chrome/browser/media/webrtc_log_uploader.cc
@@ -226,7 +226,7 @@ void WebRtcLogUploader::AddUploadedLogInfoToUploadListFile(
const std::string& report_id) {
std::string contents;
- if (file_util::PathExists(upload_list_path_)) {
+ if (base::PathExists(upload_list_path_)) {
bool read_ok = file_util::ReadFileToString(upload_list_path_, &contents);
DPCHECK(read_ok);
diff --git a/chrome/browser/media_galleries/fileapi/itunes_finder_win.cc b/chrome/browser/media_galleries/fileapi/itunes_finder_win.cc
index 40016a5..ea02812 100644
--- a/chrome/browser/media_galleries/fileapi/itunes_finder_win.cc
+++ b/chrome/browser/media_galleries/fileapi/itunes_finder_win.cc
@@ -70,7 +70,7 @@ void ITunesFinderWin::TryDefaultLocation() {
base::FilePath library_file =
music_dir.AppendASCII("iTunes").AppendASCII("iTunes Music Library.xml");
- if (!file_util::PathExists(library_file)) {
+ if (!base::PathExists(library_file)) {
PostResultToUIThread(std::string());
return;
}
@@ -81,7 +81,7 @@ void ITunesFinderWin::FinishedParsingPrefXML(
const base::FilePath& library_file) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
- if (library_file.empty() || !file_util::PathExists(library_file)) {
+ if (library_file.empty() || !base::PathExists(library_file)) {
TryDefaultLocation();
return;
}
diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util.cc b/chrome/browser/media_galleries/fileapi/native_media_file_util.cc
index 2b16efe..c9e1d6f 100644
--- a/chrome/browser/media_galleries/fileapi/native_media_file_util.cc
+++ b/chrome/browser/media_galleries/fileapi/native_media_file_util.cc
@@ -630,7 +630,7 @@ NativeMediaFileUtil::GetFilteredLocalFilePathForExistingFileOrDirectory(
if (error != base::PLATFORM_FILE_OK)
return error;
- if (!file_util::PathExists(file_path))
+ if (!base::PathExists(file_path))
return failure_error;
base::PlatformFileInfo file_info;
if (!file_util::GetFileInfo(file_path, &file_info))
diff --git a/chrome/browser/nacl_host/nacl_file_host.cc b/chrome/browser/nacl_host/nacl_file_host.cc
index cfdba1a..18efee9 100644
--- a/chrome/browser/nacl_host/nacl_file_host.cc
+++ b/chrome/browser/nacl_host/nacl_file_host.cc
@@ -108,7 +108,7 @@ void DoOpenPnaclFile(
// PNaCl must be installed.
base::FilePath pnacl_dir;
if (!NaClBrowser::GetDelegate()->GetPnaclDirectory(&pnacl_dir) ||
- !file_util::PathExists(pnacl_dir)) {
+ !base::PathExists(pnacl_dir)) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&TryInstallPnacl,
diff --git a/chrome/browser/net/net_log_temp_file.cc b/chrome/browser/net/net_log_temp_file.cc
index c764d1f..00c1dc6 100644
--- a/chrome/browser/net/net_log_temp_file.cc
+++ b/chrome/browser/net/net_log_temp_file.cc
@@ -153,5 +153,5 @@ bool NetLogTempFile::GetNetExportLogDirectory(base::FilePath* path) {
bool NetLogTempFile::NetExportLogExists() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING));
DCHECK(!log_path_.empty());
- return file_util::PathExists(log_path_);
+ return base::PathExists(log_path_);
}
diff --git a/chrome/browser/net/net_log_temp_file_unittest.cc b/chrome/browser/net/net_log_temp_file_unittest.cc
index e77ecc5..3d062bf 100644
--- a/chrome/browser/net/net_log_temp_file_unittest.cc
+++ b/chrome/browser/net/net_log_temp_file_unittest.cc
@@ -93,7 +93,7 @@ class NetLogTempFileTest : public ::testing::Test {
// constants will always be written to it on creation.
void VerifyNetExportLog() {
EXPECT_EQ(net_export_log_, net_log_temp_file_->log_path_);
- EXPECT_TRUE(file_util::PathExists(net_export_log_));
+ EXPECT_TRUE(base::PathExists(net_export_log_));
int64 file_size;
// file_util::GetFileSize returns proper file size on open handles.
@@ -142,7 +142,7 @@ class NetLogTempFileTest : public ::testing::Test {
base::FilePath net_export_file_path;
EXPECT_TRUE(net_log_temp_file_->GetFilePath(&net_export_file_path));
- EXPECT_TRUE(file_util::PathExists(net_export_file_path));
+ EXPECT_TRUE(base::PathExists(net_export_file_path));
EXPECT_EQ(net_export_log_, net_export_file_path);
VerifyNetExportLog();
@@ -187,11 +187,11 @@ TEST_F(NetLogTempFileTest, EnsureInitAllowStartOrSend) {
EXPECT_EQ(NetLogTempFile::STATE_ALLOW_START_SEND,
net_log_temp_file_->state());
EXPECT_EQ(net_export_log_, net_log_temp_file_->log_path_);
- EXPECT_TRUE(file_util::PathExists(net_export_log_));
+ EXPECT_TRUE(base::PathExists(net_export_log_));
base::FilePath net_export_file_path;
EXPECT_TRUE(net_log_temp_file_->GetFilePath(&net_export_file_path));
- EXPECT_TRUE(file_util::PathExists(net_export_file_path));
+ EXPECT_TRUE(base::PathExists(net_export_file_path));
EXPECT_EQ(net_export_log_, net_export_file_path);
// GetFilePath should return false if NetExportLogExists() fails.
diff --git a/chrome/browser/net/sqlite_server_bound_cert_store.cc b/chrome/browser/net/sqlite_server_bound_cert_store.cc
index 865d911..84322675 100644
--- a/chrome/browser/net/sqlite_server_bound_cert_store.cc
+++ b/chrome/browser/net/sqlite_server_bound_cert_store.cc
@@ -200,7 +200,7 @@ void SQLiteServerBoundCertStore::Backend::LoadOnDBThread(
// Ensure the parent directory for storing certs is created before reading
// from it.
const base::FilePath dir = path_.DirName();
- if (!file_util::PathExists(dir) && !file_util::CreateDirectory(dir))
+ if (!base::PathExists(dir) && !file_util::CreateDirectory(dir))
return;
int64 db_size = 0;
diff --git a/chrome/browser/net/url_fixer_upper.cc b/chrome/browser/net/url_fixer_upper.cc
index 6c82ba4..49671ac 100644
--- a/chrome/browser/net/url_fixer_upper.cc
+++ b/chrome/browser/net/url_fixer_upper.cc
@@ -107,7 +107,7 @@ bool ValidPathForFile(const base::FilePath::StringType& text,
if (file_path.empty())
return false;
- if (!file_util::PathExists(file_path))
+ if (!base::PathExists(file_path))
return false;
*full_path = file_path;
diff --git a/chrome/browser/page_cycler/page_cycler.cc b/chrome/browser/page_cycler/page_cycler.cc
index 0d10e08..8ca9326 100644
--- a/chrome/browser/page_cycler/page_cycler.cc
+++ b/chrome/browser/page_cycler/page_cycler.cc
@@ -92,7 +92,7 @@ void PageCycler::ReadURLsOnBackgroundThread() {
std::string file_contents;
std::vector<std::string> url_strings;
- CHECK(file_util::PathExists(urls_file_)) << urls_file_.value();
+ CHECK(base::PathExists(urls_file_)) << urls_file_.value();
file_util::ReadFileToString(urls_file_, &file_contents);
base::SplitStringAlongWhitespace(file_contents, &url_strings);
@@ -209,7 +209,7 @@ void PageCycler::WriteResultsOnBackgroundThread(const std::string& output) {
if (!output.empty()) {
CHECK(!stats_file_.empty());
- if (file_util::PathExists(stats_file_)) {
+ if (base::PathExists(stats_file_)) {
VLOG(1) << "PageCycler: Previous stats file found; appending.";
file_util::AppendToFile(stats_file_, output.c_str(), output.size());
} else {
@@ -220,7 +220,7 @@ void PageCycler::WriteResultsOnBackgroundThread(const std::string& output) {
if (!error_.empty()) {
file_util::WriteFile(errors_file_, UTF16ToUTF8(error_).c_str(),
error_.size());
- } else if (file_util::PathExists(errors_file_)) {
+ } else if (base::PathExists(errors_file_)) {
// If there is an old error file, delete it to avoid confusion.
base::Delete(errors_file_, false);
}
diff --git a/chrome/browser/page_cycler/page_cycler_browsertest.cc b/chrome/browser/page_cycler/page_cycler_browsertest.cc
index f887001..656c687 100644
--- a/chrome/browser/page_cycler/page_cycler_browsertest.cc
+++ b/chrome/browser/page_cycler/page_cycler_browsertest.cc
@@ -51,9 +51,9 @@ class PageCyclerBrowserTest : public content::NotificationObserver,
errors_file_ = temp_path.AppendASCII("errors");
stats_file_ = temp_path.AppendASCII("stats");
- ASSERT_FALSE(file_util::PathExists(urls_file_));
- ASSERT_FALSE(file_util::PathExists(errors_file_));
- ASSERT_FALSE(file_util::PathExists(stats_file_));
+ ASSERT_FALSE(base::PathExists(urls_file_));
+ ASSERT_FALSE(base::PathExists(errors_file_));
+ ASSERT_FALSE(base::PathExists(stats_file_));
}
// Initialize a PageCycler using either the base fields, or using provided
@@ -152,17 +152,17 @@ class PageCyclerCachedBrowserTest : public PageCyclerBrowserTest {
test_dir = test_dir.AppendASCII("page_cycler");
base::FilePath source_data_dir = test_dir.AppendASCII("cached_data_dir");
- CHECK(file_util::PathExists(source_data_dir));
+ CHECK(base::PathExists(source_data_dir));
CHECK(user_data_dir_.CreateUniqueTempDir());
base::FilePath dest_data_dir =
user_data_dir_.path().AppendASCII("cached_data_dir");
- CHECK(!file_util::PathExists(dest_data_dir));
+ CHECK(!base::PathExists(dest_data_dir));
CHECK(base::CopyDirectory(source_data_dir, user_data_dir_.path(),
true)); // recursive.
- CHECK(file_util::PathExists(dest_data_dir));
+ CHECK(base::PathExists(dest_data_dir));
command_line->AppendSwitchPath(switches::kUserDataDir,
dest_data_dir);
@@ -177,9 +177,9 @@ class PageCyclerCachedBrowserTest : public PageCyclerBrowserTest {
errors_file_ = temp_path.AppendASCII("errors");
stats_file_ = temp_path.AppendASCII("stats");
- ASSERT_TRUE(file_util::PathExists(urls_file_));
- ASSERT_FALSE(file_util::PathExists(errors_file_));
- ASSERT_FALSE(file_util::PathExists(stats_file_));
+ ASSERT_TRUE(base::PathExists(urls_file_));
+ ASSERT_FALSE(base::PathExists(errors_file_));
+ ASSERT_FALSE(base::PathExists(stats_file_));
}
private:
@@ -207,8 +207,8 @@ IN_PROC_BROWSER_TEST_F(PageCyclerBrowserTest, BasicTest) {
page_cycler()->Run();
content::RunMessageLoop();
- ASSERT_FALSE(file_util::PathExists(errors_file()));
- ASSERT_TRUE(file_util::PathExists(stats_file()));
+ ASSERT_FALSE(base::PathExists(errors_file()));
+ ASSERT_TRUE(base::PathExists(stats_file()));
}
// Test to make sure that PageCycler will recognize unvisitable URLs, and will
@@ -236,8 +236,8 @@ IN_PROC_BROWSER_TEST_F(PageCyclerBrowserTest, UnvisitableURL) {
page_cycler()->Run();
content::RunMessageLoop();
- ASSERT_TRUE(file_util::PathExists(errors_file()));
- ASSERT_TRUE(file_util::PathExists(stats_file()));
+ ASSERT_TRUE(base::PathExists(errors_file()));
+ ASSERT_TRUE(base::PathExists(stats_file()));
std::vector<std::string> errors = GetErrorsFromFile();
@@ -270,8 +270,8 @@ IN_PROC_BROWSER_TEST_F(PageCyclerBrowserTest, InvalidURL) {
page_cycler()->Run();
content::RunMessageLoop();
- ASSERT_TRUE(file_util::PathExists(errors_file()));
- ASSERT_TRUE(file_util::PathExists(stats_file()));
+ ASSERT_TRUE(base::PathExists(errors_file()));
+ ASSERT_TRUE(base::PathExists(stats_file()));
std::vector<std::string> errors = GetErrorsFromFile();
ASSERT_EQ(1u, errors.size());
@@ -303,8 +303,8 @@ IN_PROC_BROWSER_TEST_F(PageCyclerBrowserTest, ChromeErrorURL) {
page_cycler()->Run();
content::RunMessageLoop();
- ASSERT_TRUE(file_util::PathExists(errors_file()));
- ASSERT_TRUE(file_util::PathExists(stats_file()));
+ ASSERT_TRUE(base::PathExists(errors_file()));
+ ASSERT_TRUE(base::PathExists(stats_file()));
std::vector<std::string> errors = GetErrorsFromFile();
ASSERT_EQ(1u, errors.size());
@@ -343,8 +343,8 @@ IN_PROC_BROWSER_TEST_F(PageCyclerCachedBrowserTest, DISABLED_PlaybackMode) {
page_cycler()->Run();
content::RunMessageLoop();
- ASSERT_TRUE(file_util::PathExists(stats_file()));
- ASSERT_FALSE(file_util::PathExists(errors_file()));
+ ASSERT_TRUE(base::PathExists(stats_file()));
+ ASSERT_FALSE(base::PathExists(errors_file()));
}
#endif // !defined(OS_CHROMEOS)
@@ -374,7 +374,7 @@ IN_PROC_BROWSER_TEST_F(PageCyclerCachedBrowserTest, MAYBE_URLNotInCache) {
// other URLs.
base::FilePath new_urls_file = temp.path().AppendASCII("urls");
- ASSERT_FALSE(file_util::PathExists(new_urls_file));
+ ASSERT_FALSE(base::PathExists(new_urls_file));
ASSERT_TRUE(file_util::WriteFile(new_urls_file, kCacheMissURL,
sizeof(kCacheMissURL)));
@@ -383,8 +383,8 @@ IN_PROC_BROWSER_TEST_F(PageCyclerCachedBrowserTest, MAYBE_URLNotInCache) {
page_cycler()->Run();
content::RunMessageLoop();
- ASSERT_TRUE(file_util::PathExists(errors_file()));
- ASSERT_TRUE(file_util::PathExists(stats_file()));
+ ASSERT_TRUE(base::PathExists(errors_file()));
+ ASSERT_TRUE(base::PathExists(stats_file()));
std::vector<std::string> errors = GetErrorsFromFile();
ASSERT_EQ(1u, errors.size());
diff --git a/chrome/browser/page_cycler/page_cycler_unittest.cc b/chrome/browser/page_cycler/page_cycler_unittest.cc
index f46bf09..eef3eb8 100644
--- a/chrome/browser/page_cycler/page_cycler_unittest.cc
+++ b/chrome/browser/page_cycler/page_cycler_unittest.cc
@@ -30,7 +30,7 @@ using content::RenderViewHost;
using content::TestBrowserThread;
using content::WebContentsObserver;
using file_util::ContentsEqual;
-using file_util::PathExists;
+using base::PathExists;
namespace {
const int kFrameID = 1;
@@ -122,8 +122,8 @@ class PageCyclerTest : public BrowserWithTestWindowTest {
errors_file_ = temp_path.AppendASCII("errors_file");
stats_file_ = temp_path.AppendASCII("stats_file");
- CHECK(!file_util::PathExists(errors_file_));
- CHECK(!file_util::PathExists(stats_file_));
+ CHECK(!base::PathExists(errors_file_));
+ CHECK(!base::PathExists(stats_file_));
}
void FailProvisionalLoad(int error_code, string16& error_description) {
diff --git a/chrome/browser/performance_monitor/performance_monitor_browsertest.cc b/chrome/browser/performance_monitor/performance_monitor_browsertest.cc
index c5aac77..b5fa1803 100644
--- a/chrome/browser/performance_monitor/performance_monitor_browsertest.cc
+++ b/chrome/browser/performance_monitor/performance_monitor_browsertest.cc
@@ -307,12 +307,12 @@ class PerformanceMonitorUncleanExitBrowserTest
PathService::Get(chrome::DIR_TEST_DATA, &stock_prefs_file);
stock_prefs_file = stock_prefs_file.AppendASCII("performance_monitor")
.AppendASCII("unclean_exit_prefs");
- CHECK(file_util::PathExists(stock_prefs_file));
+ CHECK(base::PathExists(stock_prefs_file));
base::FilePath first_profile_prefs_file =
first_profile.Append(chrome::kPreferencesFilename);
CHECK(base::CopyFile(stock_prefs_file, first_profile_prefs_file));
- CHECK(file_util::PathExists(first_profile_prefs_file));
+ CHECK(base::PathExists(first_profile_prefs_file));
second_profile_name_ =
std::string(chrome::kMultiProfileDirPrefix)
@@ -325,7 +325,7 @@ class PerformanceMonitorUncleanExitBrowserTest
base::FilePath second_profile_prefs_file =
second_profile.Append(chrome::kPreferencesFilename);
CHECK(base::CopyFile(stock_prefs_file, second_profile_prefs_file));
- CHECK(file_util::PathExists(second_profile_prefs_file));
+ CHECK(base::PathExists(second_profile_prefs_file));
return true;
}
diff --git a/chrome/browser/policy/cloud/user_cloud_policy_store.cc b/chrome/browser/policy/cloud/user_cloud_policy_store.cc
index 1381d98..30e00dc 100644
--- a/chrome/browser/policy/cloud/user_cloud_policy_store.cc
+++ b/chrome/browser/policy/cloud/user_cloud_policy_store.cc
@@ -51,7 +51,7 @@ const base::FilePath::CharType kPolicyCacheFile[] =
policy::PolicyLoadResult LoadPolicyFromDisk(const base::FilePath& path) {
policy::PolicyLoadResult result;
// If the backing file does not exist, just return.
- if (!file_util::PathExists(path)) {
+ if (!base::PathExists(path)) {
result.status = policy::LOAD_RESULT_NO_POLICY_FILE;
return result;
}
diff --git a/chrome/browser/policy/cloud/user_cloud_policy_store_unittest.cc b/chrome/browser/policy/cloud/user_cloud_policy_store_unittest.cc
index 671f914..1f5b21e 100644
--- a/chrome/browser/policy/cloud/user_cloud_policy_store_unittest.cc
+++ b/chrome/browser/policy/cloud/user_cloud_policy_store_unittest.cc
@@ -199,14 +199,14 @@ TEST_F(UserCloudPolicyStoreTest, StoreThenClear) {
EXPECT_FALSE(store_->policy_map().empty());
// Policy file should exist.
- ASSERT_TRUE(file_util::PathExists(policy_file()));
+ ASSERT_TRUE(base::PathExists(policy_file()));
EXPECT_CALL(observer_, OnStoreLoaded(store_.get()));
store_->Clear();
RunUntilIdle();
// Policy file should not exist.
- ASSERT_TRUE(!file_util::PathExists(policy_file()));
+ ASSERT_TRUE(!base::PathExists(policy_file()));
// Policy should be gone.
EXPECT_FALSE(store_->policy());
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index ad812a6..a93280c 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -287,14 +287,14 @@ void DownloadAndVerifyFile(
content::DownloadTestObserver::ON_DANGEROUS_DOWNLOAD_FAIL);
GURL url(URLRequestMockHTTPJob::GetMockUrl(file));
base::FilePath downloaded = dir.Append(file);
- EXPECT_FALSE(file_util::PathExists(downloaded));
+ EXPECT_FALSE(base::PathExists(downloaded));
ui_test_utils::NavigateToURLWithDisposition(
browser, url, CURRENT_TAB,
ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
observer.WaitForFinished();
EXPECT_EQ(
1u, observer.NumDownloadsSeenInState(content::DownloadItem::COMPLETE));
- EXPECT_TRUE(file_util::PathExists(downloaded));
+ EXPECT_TRUE(base::PathExists(downloaded));
base::FileEnumerator enumerator(dir, false, base::FileEnumerator::FILES);
EXPECT_EQ(file, enumerator.Next().BaseName());
EXPECT_EQ(base::FilePath(), enumerator.Next());
@@ -1127,7 +1127,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, AlwaysAuthorizePlugins) {
// Verify that the test page exists. It is only present in checkouts with
// src-internal.
- if (!file_util::PathExists(ui_test_utils::GetTestFilePath(
+ if (!base::PathExists(ui_test_utils::GetTestFilePath(
base::FilePath(FILE_PATH_LITERAL("plugin")),
base::FilePath(FILE_PATH_LITERAL("quicktime.html"))))) {
LOG(INFO) <<
@@ -1249,7 +1249,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DownloadDirectory) {
UpdateProviderPolicy(policies);
DownloadAndVerifyFile(browser(), forced_dir.path(), file);
// Verify that the first download location wasn't affected.
- EXPECT_FALSE(file_util::PathExists(initial_dir.path().Append(file)));
+ EXPECT_FALSE(base::PathExists(initial_dir.path().Append(file)));
}
#endif
diff --git a/chrome/browser/policy/policy_loader_win.cc b/chrome/browser/policy/policy_loader_win.cc
index 947d70c..e52a866 100644
--- a/chrome/browser/policy/policy_loader_win.cc
+++ b/chrome/browser/policy/policy_loader_win.cc
@@ -583,12 +583,12 @@ bool PolicyLoaderWin::ReadPRegFile(const base::FilePath& preg_file,
// access to the %WINDIR%/System32/GroupPolicy directory to
// %WINDIR%/SysWOW64/GroupPolicy, but the file is actually in the
// system-native directory.
- if (file_util::PathExists(preg_file)) {
+ if (base::PathExists(preg_file)) {
return preg_parser::ReadFile(preg_file, chrome_policy_key_, policy, status);
} else {
// Try with redirection switched off.
ScopedDisableWow64Redirection redirection_disable;
- if (redirection_disable.is_active() && file_util::PathExists(preg_file)) {
+ if (redirection_disable.is_active() && base::PathExists(preg_file)) {
status->Add(POLICY_LOAD_STATUS_WOW64_REDIRECTION_DISABLED);
return preg_parser::ReadFile(preg_file, chrome_policy_key_, policy,
status);
diff --git a/chrome/browser/prefs/chrome_pref_service_unittest.cc b/chrome/browser/prefs/chrome_pref_service_unittest.cc
index 801ca67..683ffa5 100644
--- a/chrome/browser/prefs/chrome_pref_service_unittest.cc
+++ b/chrome/browser/prefs/chrome_pref_service_unittest.cc
@@ -67,7 +67,7 @@ class ChromePrefServiceUserFilePrefsTest : public testing::Test {
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_dir_));
data_dir_ = data_dir_.AppendASCII("pref_service");
- ASSERT_TRUE(file_util::PathExists(data_dir_));
+ ASSERT_TRUE(base::PathExists(data_dir_));
}
void ClearListValue(PrefService* prefs, const char* key) {
@@ -137,7 +137,7 @@ TEST_F(ChromePrefServiceUserFilePrefsTest, PreserveEmptyValue) {
// Compare to expected output.
base::FilePath golden_output_file =
data_dir_.AppendASCII("write.golden.need_empty_value.json");
- ASSERT_TRUE(file_util::PathExists(golden_output_file));
+ ASSERT_TRUE(base::PathExists(golden_output_file));
EXPECT_TRUE(file_util::TextContentsEqual(golden_output_file, pref_file));
}
diff --git a/chrome/browser/prefs/pref_service_browsertest.cc b/chrome/browser/prefs/pref_service_browsertest.cc
index c2bcf0f..fc1ba42 100644
--- a/chrome/browser/prefs/pref_service_browsertest.cc
+++ b/chrome/browser/prefs/pref_service_browsertest.cc
@@ -77,7 +77,7 @@ class PreferenceServiceTest : public InProcessBrowserTest {
tmp_pref_file_ = user_data_directory.Append(chrome::kLocalStateFilename);
}
- CHECK(file_util::PathExists(reference_pref_file));
+ CHECK(base::PathExists(reference_pref_file));
// Copy only the Preferences file if |new_profile_|, or Local State if not,
// and the rest will be automatically created.
CHECK(base::CopyFile(reference_pref_file, tmp_pref_file_));
diff --git a/chrome/browser/printing/printing_layout_browsertest.cc b/chrome/browser/printing/printing_layout_browsertest.cc
index 2ce4ffc..4ac0aaf 100644
--- a/chrome/browser/printing/printing_layout_browsertest.cc
+++ b/chrome/browser/printing/printing_layout_browsertest.cc
@@ -127,7 +127,7 @@ class PrintingLayoutTest : public PrintingTest<InProcessBrowserTest>,
base::FilePath cleartype(
base_path.Append(verification_name + L"_cleartype.png"));
// Looks for Cleartype override.
- if (file_util::PathExists(cleartype) && IsClearTypeEnabled())
+ if (base::PathExists(cleartype) && IsClearTypeEnabled())
png = cleartype;
if (GenerateFiles()) {
diff --git a/chrome/browser/profiles/profile_browsertest.cc b/chrome/browser/profiles/profile_browsertest.cc
index 19a7e0d..fdfc583 100644
--- a/chrome/browser/profiles/profile_browsertest.cc
+++ b/chrome/browser/profiles/profile_browsertest.cc
@@ -163,7 +163,7 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, DISABLED_ProfileReadmeCreated) {
content::RunAllPendingInMessageLoop(content::BrowserThread::FILE);
// Verify that README exists.
- EXPECT_TRUE(file_util::PathExists(
+ EXPECT_TRUE(base::PathExists(
temp_dir.path().Append(chrome::kReadmeFilename)));
}
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 7123d16..09e414b 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -202,7 +202,7 @@ base::FilePath GetMediaCachePath(const base::FilePath& base) {
void EnsureReadmeFile(const base::FilePath& base) {
base::FilePath readme_path = base.Append(chrome::kReadmeFilename);
- if (file_util::PathExists(readme_path))
+ if (base::PathExists(readme_path))
return;
std::string product_name = l10n_util::GetStringUTF8(IDS_PRODUCT_NAME);
std::string readme_text = base::StringPrintf(
@@ -253,7 +253,7 @@ Profile* Profile::CreateProfile(const base::FilePath& path,
DCHECK(delegate);
CreateProfileDirectory(sequenced_task_runner.get(), path);
} else if (create_mode == CREATE_MODE_SYNCHRONOUS) {
- if (!file_util::PathExists(path)) {
+ if (!base::PathExists(path)) {
// TODO(tc): http://b/1094718 Bad things happen if we can't write to the
// profile directory. We should eventually be able to run in this
// situation.
diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc
index dd46660..82e3f81 100644
--- a/chrome/browser/profiles/profile_manager_unittest.cc
+++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -66,7 +66,7 @@ class ProfileManager : public ::ProfileManagerWithoutInit {
protected:
virtual Profile* CreateProfileHelper(
const base::FilePath& file_path) OVERRIDE {
- if (!file_util::PathExists(file_path)) {
+ if (!base::PathExists(file_path)) {
if (!file_util::CreateDirectory(file_path))
return NULL;
}
diff --git a/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc b/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
index 22275db..ac31a6a 100644
--- a/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
+++ b/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
@@ -73,7 +73,7 @@ class ProfileShortcutManagerTest : public testing::Test {
ASSERT_FALSE(ProfileShortcutExistsAtDefaultPath(profile_name));
const base::FilePath icon_path =
profile_path.AppendASCII(profiles::internal::kProfileIconFileName);
- ASSERT_FALSE(file_util::PathExists(icon_path));
+ ASSERT_FALSE(base::PathExists(icon_path));
}
}
@@ -121,7 +121,7 @@ class ProfileShortcutManagerTest : public testing::Test {
// Returns true if the shortcut for this profile exists.
bool ProfileShortcutExistsAtDefaultPath(const string16& profile_name) {
- return file_util::PathExists(
+ return base::PathExists(
GetDefaultShortcutPathForProfile(profile_name));
}
@@ -130,12 +130,12 @@ class ProfileShortcutManagerTest : public testing::Test {
void ValidateProfileShortcutAtPath(const tracked_objects::Location& location,
const base::FilePath& shortcut_path,
const base::FilePath& profile_path) {
- EXPECT_TRUE(file_util::PathExists(shortcut_path)) << location.ToString();
+ EXPECT_TRUE(base::PathExists(shortcut_path)) << location.ToString();
// Ensure that the corresponding icon exists.
const base::FilePath icon_path =
profile_path.AppendASCII(profiles::internal::kProfileIconFileName);
- EXPECT_TRUE(file_util::PathExists(icon_path)) << location.ToString();
+ EXPECT_TRUE(base::PathExists(icon_path)) << location.ToString();
base::win::ShortcutProperties expected_properties;
expected_properties.set_app_id(
@@ -161,7 +161,7 @@ class ProfileShortcutManagerTest : public testing::Test {
void ValidateNonProfileShortcutAtPath(
const tracked_objects::Location& location,
const base::FilePath& shortcut_path) {
- EXPECT_TRUE(file_util::PathExists(shortcut_path)) << location.ToString();
+ EXPECT_TRUE(base::PathExists(shortcut_path)) << location.ToString();
base::win::ShortcutProperties expected_properties;
expected_properties.set_target(GetExePath());
@@ -197,7 +197,7 @@ class ProfileShortcutManagerTest : public testing::Test {
const string16& shortcut_name) {
const base::FilePath shortcut_path =
GetUserShortcutsDirectory().Append(shortcut_name + installer::kLnkExt);
- EXPECT_FALSE(file_util::PathExists(shortcut_path)) << location.ToString();
+ EXPECT_FALSE(base::PathExists(shortcut_path)) << location.ToString();
installer::Product product(GetDistribution());
ShellUtil::ShortcutProperties properties(ShellUtil::CURRENT_USER);
@@ -206,7 +206,7 @@ class ProfileShortcutManagerTest : public testing::Test {
EXPECT_TRUE(ShellUtil::CreateOrUpdateShortcut(
ShellUtil::SHORTCUT_LOCATION_DESKTOP, GetDistribution(), properties,
ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS)) << location.ToString();
- EXPECT_TRUE(file_util::PathExists(shortcut_path)) << location.ToString();
+ EXPECT_TRUE(base::PathExists(shortcut_path)) << location.ToString();
return shortcut_path;
}
@@ -223,7 +223,7 @@ class ProfileShortcutManagerTest : public testing::Test {
const base::FilePath system_level_shortcut_path =
GetSystemShortcutsDirectory().Append(
distribution->GetAppShortCutName() + installer::kLnkExt);
- EXPECT_TRUE(file_util::PathExists(system_level_shortcut_path))
+ EXPECT_TRUE(base::PathExists(system_level_shortcut_path))
<< location.ToString();
return system_level_shortcut_path;
}
@@ -392,8 +392,8 @@ TEST_F(ProfileShortcutManagerTest, DeleteSecondToLastProfileWithoutShortcut) {
// Delete the shortcut for the first profile, but keep the one for the 2nd.
ASSERT_TRUE(base::Delete(profile_1_shortcut_path, false));
- ASSERT_FALSE(file_util::PathExists(profile_1_shortcut_path));
- ASSERT_TRUE(file_util::PathExists(profile_2_shortcut_path));
+ ASSERT_FALSE(base::PathExists(profile_1_shortcut_path));
+ ASSERT_TRUE(base::PathExists(profile_2_shortcut_path));
// Delete the profile that doesn't have a shortcut.
profile_info_cache_->DeleteProfileFromCache(profile_1_path_);
@@ -402,8 +402,8 @@ TEST_F(ProfileShortcutManagerTest, DeleteSecondToLastProfileWithoutShortcut) {
// Verify that the remaining shortcut does not have a profile name.
ValidateNonProfileShortcut(FROM_HERE);
// Verify that shortcuts with profile names do not exist.
- EXPECT_FALSE(file_util::PathExists(profile_1_shortcut_path));
- EXPECT_FALSE(file_util::PathExists(profile_2_shortcut_path));
+ EXPECT_FALSE(base::PathExists(profile_1_shortcut_path));
+ EXPECT_FALSE(base::PathExists(profile_2_shortcut_path));
}
TEST_F(ProfileShortcutManagerTest, DeleteSecondToLastProfileWithShortcut) {
@@ -416,8 +416,8 @@ TEST_F(ProfileShortcutManagerTest, DeleteSecondToLastProfileWithShortcut) {
// Delete the shortcut for the first profile, but keep the one for the 2nd.
ASSERT_TRUE(base::Delete(profile_1_shortcut_path, false));
- ASSERT_FALSE(file_util::PathExists(profile_1_shortcut_path));
- ASSERT_TRUE(file_util::PathExists(profile_2_shortcut_path));
+ ASSERT_FALSE(base::PathExists(profile_1_shortcut_path));
+ ASSERT_TRUE(base::PathExists(profile_2_shortcut_path));
// Delete the profile that has a shortcut.
profile_info_cache_->DeleteProfileFromCache(profile_2_path_);
@@ -426,8 +426,8 @@ TEST_F(ProfileShortcutManagerTest, DeleteSecondToLastProfileWithShortcut) {
// Verify that the remaining shortcut does not have a profile name.
ValidateNonProfileShortcut(FROM_HERE);
// Verify that shortcuts with profile names do not exist.
- EXPECT_FALSE(file_util::PathExists(profile_1_shortcut_path));
- EXPECT_FALSE(file_util::PathExists(profile_2_shortcut_path));
+ EXPECT_FALSE(base::PathExists(profile_1_shortcut_path));
+ EXPECT_FALSE(base::PathExists(profile_2_shortcut_path));
}
TEST_F(ProfileShortcutManagerTest, DeleteOnlyProfileWithShortcuts) {
@@ -448,19 +448,19 @@ TEST_F(ProfileShortcutManagerTest, DeleteOnlyProfileWithShortcuts) {
ASSERT_TRUE(base::Delete(profile_2_shortcut_path, false));
// Only the shortcut to the third profile should exist.
- ASSERT_FALSE(file_util::PathExists(profile_1_shortcut_path));
- ASSERT_FALSE(file_util::PathExists(profile_2_shortcut_path));
- ASSERT_FALSE(file_util::PathExists(non_profile_shortcut_path));
- ASSERT_TRUE(file_util::PathExists(profile_3_shortcut_path));
+ ASSERT_FALSE(base::PathExists(profile_1_shortcut_path));
+ ASSERT_FALSE(base::PathExists(profile_2_shortcut_path));
+ ASSERT_FALSE(base::PathExists(non_profile_shortcut_path));
+ ASSERT_TRUE(base::PathExists(profile_3_shortcut_path));
// Delete the third profile and check that its shortcut is gone and no
// shortcuts have been re-created.
profile_info_cache_->DeleteProfileFromCache(profile_3_path_);
RunPendingTasks();
- ASSERT_FALSE(file_util::PathExists(profile_1_shortcut_path));
- ASSERT_FALSE(file_util::PathExists(profile_2_shortcut_path));
- ASSERT_FALSE(file_util::PathExists(profile_3_shortcut_path));
- ASSERT_FALSE(file_util::PathExists(non_profile_shortcut_path));
+ ASSERT_FALSE(base::PathExists(profile_1_shortcut_path));
+ ASSERT_FALSE(base::PathExists(profile_2_shortcut_path));
+ ASSERT_FALSE(base::PathExists(profile_3_shortcut_path));
+ ASSERT_FALSE(base::PathExists(non_profile_shortcut_path));
}
TEST_F(ProfileShortcutManagerTest, DesktopShortcutsCreateSecond) {
@@ -504,7 +504,7 @@ TEST_F(ProfileShortcutManagerTest, RenamedDesktopShortcuts) {
// Delete the renamed shortcut and try to create it again, which should work.
ASSERT_TRUE(base::Delete(profile_2_shortcut_path_2, false));
- EXPECT_FALSE(file_util::PathExists(profile_2_shortcut_path_2));
+ EXPECT_FALSE(base::PathExists(profile_2_shortcut_path_2));
profile_shortcut_manager_->CreateProfileShortcut(profile_2_path_);
RunPendingTasks();
ValidateProfileShortcut(FROM_HERE, profile_2_name_, profile_2_path_);
@@ -531,13 +531,13 @@ TEST_F(ProfileShortcutManagerTest, RenamedDesktopShortcutsGetDeleted) {
ASSERT_TRUE(base::CopyFile(
GetDefaultShortcutPathForProfile(profile_1_name_),
preserved_profile_1_shortcut_path));
- EXPECT_TRUE(file_util::PathExists(preserved_profile_1_shortcut_path));
+ EXPECT_TRUE(base::PathExists(preserved_profile_1_shortcut_path));
// Delete the profile and ensure both shortcuts were also deleted.
profile_info_cache_->DeleteProfileFromCache(profile_2_path_);
RunPendingTasks();
- EXPECT_FALSE(file_util::PathExists(profile_2_shortcut_path_1));
- EXPECT_FALSE(file_util::PathExists(profile_2_shortcut_path_2));
+ EXPECT_FALSE(base::PathExists(profile_2_shortcut_path_1));
+ EXPECT_FALSE(base::PathExists(profile_2_shortcut_path_2));
ValidateNonProfileShortcutAtPath(FROM_HERE,
preserved_profile_1_shortcut_path);
}
@@ -563,7 +563,7 @@ TEST_F(ProfileShortcutManagerTest, RenamedDesktopShortcutsAfterProfileRename) {
// The original shortcut should be renamed but the copied shortcut should
// keep its name.
- EXPECT_FALSE(file_util::PathExists(profile_2_shortcut_path_1));
+ EXPECT_FALSE(base::PathExists(profile_2_shortcut_path_1));
ValidateProfileShortcutAtPath(FROM_HERE, profile_2_shortcut_path_2,
profile_2_path_);
ValidateProfileShortcut(FROM_HERE, new_profile_2_name, profile_2_path_);
@@ -583,7 +583,7 @@ TEST_F(ProfileShortcutManagerTest, UpdateShortcutWithNoFlags) {
// Add another profile and check that the shortcut was replaced with
// a badged shortcut with the right command line for the profile
CreateProfileWithShortcut(FROM_HERE, profile_2_name_, profile_2_path_);
- EXPECT_FALSE(file_util::PathExists(regular_shortcut_path));
+ EXPECT_FALSE(base::PathExists(regular_shortcut_path));
ValidateProfileShortcut(FROM_HERE, profile_1_name_, profile_1_path_);
}
@@ -603,7 +603,7 @@ TEST_F(ProfileShortcutManagerTest, UpdateTwoShortcutsWithNoFlags) {
// Add another profile and check that one shortcut was renamed and that the
// other shortcut was updated but kept the same name.
CreateProfileWithShortcut(FROM_HERE, profile_2_name_, profile_2_path_);
- EXPECT_FALSE(file_util::PathExists(regular_shortcut_path));
+ EXPECT_FALSE(base::PathExists(regular_shortcut_path));
ValidateProfileShortcutAtPath(FROM_HERE, customized_regular_shortcut_path,
profile_1_path_);
ValidateProfileShortcut(FROM_HERE, profile_1_name_, profile_1_path_);
@@ -636,8 +636,8 @@ TEST_F(ProfileShortcutManagerTest, RemoveProfileShortcuts) {
// shortcuts for profile 2 were kept.
profile_shortcut_manager_->RemoveProfileShortcuts(profile_1_path_);
RunPendingTasks();
- EXPECT_FALSE(file_util::PathExists(profile_1_shortcut_path_1));
- EXPECT_FALSE(file_util::PathExists(profile_1_shortcut_path_2));
+ EXPECT_FALSE(base::PathExists(profile_1_shortcut_path_1));
+ EXPECT_FALSE(base::PathExists(profile_1_shortcut_path_2));
ValidateProfileShortcutAtPath(FROM_HERE, profile_2_shortcut_path_1,
profile_2_path_);
ValidateProfileShortcutAtPath(FROM_HERE, profile_2_shortcut_path_2,
@@ -665,7 +665,7 @@ TEST_F(ProfileShortcutManagerTest, HasProfileShortcuts) {
const base::FilePath profile_2_shortcut_path =
GetDefaultShortcutPathForProfile(profile_2_name_);
ASSERT_TRUE(base::Delete(profile_2_shortcut_path, false));
- EXPECT_FALSE(file_util::PathExists(profile_2_shortcut_path));
+ EXPECT_FALSE(base::PathExists(profile_2_shortcut_path));
profile_shortcut_manager_->HasProfileShortcuts(profile_2_path_, callback);
RunPendingTasks();
EXPECT_FALSE(result.has_shortcuts);
@@ -682,8 +682,8 @@ TEST_F(ProfileShortcutManagerTest, ProfileShortcutsWithSystemLevelShortcut) {
ASSERT_EQ(1U, profile_info_cache_->GetNumberOfProfiles());
// Ensure system-level continues to exist and user-level was not created.
- EXPECT_TRUE(file_util::PathExists(system_level_shortcut_path));
- EXPECT_FALSE(file_util::PathExists(
+ EXPECT_TRUE(base::PathExists(system_level_shortcut_path));
+ EXPECT_FALSE(base::PathExists(
GetDefaultShortcutPathForProfile(string16())));
// Create another profile with a shortcut and ensure both profiles receive
@@ -691,7 +691,7 @@ TEST_F(ProfileShortcutManagerTest, ProfileShortcutsWithSystemLevelShortcut) {
CreateProfileWithShortcut(FROM_HERE, profile_2_name_, profile_2_path_);
ValidateProfileShortcut(FROM_HERE, profile_1_name_, profile_1_path_);
ValidateProfileShortcut(FROM_HERE, profile_2_name_, profile_2_path_);
- EXPECT_TRUE(file_util::PathExists(system_level_shortcut_path));
+ EXPECT_TRUE(base::PathExists(system_level_shortcut_path));
// Create a third profile without a shortcut and ensure it doesn't get one.
profile_info_cache_->AddProfileToCache(profile_3_path_, profile_3_name_,
@@ -736,7 +736,7 @@ TEST_F(ProfileShortcutManagerTest,
profile_info_cache_->DeleteProfileFromCache(profile_1_path_);
RunPendingTasks();
- EXPECT_TRUE(file_util::PathExists(system_level_shortcut_path));
+ EXPECT_TRUE(base::PathExists(system_level_shortcut_path));
EXPECT_FALSE(ProfileShortcutExistsAtDefaultPath(string16()));
EXPECT_FALSE(ProfileShortcutExistsAtDefaultPath(profile_1_name_));
EXPECT_FALSE(ProfileShortcutExistsAtDefaultPath(profile_2_name_));
@@ -753,8 +753,8 @@ TEST_F(ProfileShortcutManagerTest,
// Delete the shortcut for the first profile, but keep the one for the 2nd.
ASSERT_TRUE(base::Delete(profile_1_shortcut_path, false));
- ASSERT_FALSE(file_util::PathExists(profile_1_shortcut_path));
- ASSERT_TRUE(file_util::PathExists(profile_2_shortcut_path));
+ ASSERT_FALSE(base::PathExists(profile_1_shortcut_path));
+ ASSERT_TRUE(base::PathExists(profile_2_shortcut_path));
const base::FilePath system_level_shortcut_path =
CreateRegularSystemLevelShortcut(FROM_HERE);
@@ -766,9 +766,9 @@ TEST_F(ProfileShortcutManagerTest,
RunPendingTasks();
// Verify that only the system-level shortcut still exists.
- EXPECT_TRUE(file_util::PathExists(system_level_shortcut_path));
- EXPECT_FALSE(file_util::PathExists(
+ EXPECT_TRUE(base::PathExists(system_level_shortcut_path));
+ EXPECT_FALSE(base::PathExists(
GetDefaultShortcutPathForProfile(string16())));
- EXPECT_FALSE(file_util::PathExists(profile_1_shortcut_path));
- EXPECT_FALSE(file_util::PathExists(profile_2_shortcut_path));
+ EXPECT_FALSE(base::PathExists(profile_1_shortcut_path));
+ EXPECT_FALSE(base::PathExists(profile_2_shortcut_path));
}
diff --git a/chrome/browser/profiles/profile_shortcut_manager_win.cc b/chrome/browser/profiles/profile_shortcut_manager_win.cc
index 296fb28..b0a0937 100644
--- a/chrome/browser/profiles/profile_shortcut_manager_win.cc
+++ b/chrome/browser/profiles/profile_shortcut_manager_win.cc
@@ -286,12 +286,12 @@ void RenameChromeDesktopShortcutForProfile(
const base::FilePath new_shortcut_path =
user_shortcuts_directory.Append(new_shortcut_filename);
- if (file_util::PathExists(old_shortcut_path)) {
+ if (base::PathExists(old_shortcut_path)) {
// Rename the old shortcut unless a system-level shortcut exists at the
// destination, in which case the old shortcut is simply deleted.
const base::FilePath possible_new_system_shortcut =
system_shortcuts_directory.Append(new_shortcut_filename);
- if (file_util::PathExists(possible_new_system_shortcut))
+ if (base::PathExists(possible_new_system_shortcut))
base::Delete(old_shortcut_path, false);
else if (!RenameDesktopShortcut(old_shortcut_path, new_shortcut_path))
DLOG(ERROR) << "Could not rename Windows profile desktop shortcut.";
@@ -304,7 +304,7 @@ void RenameChromeDesktopShortcutForProfile(
// properties updated by |CreateOrUpdateDesktopShortcutsForProfile()|.
const base::FilePath possible_old_system_shortcut =
system_shortcuts_directory.Append(old_shortcut_filename);
- if (file_util::PathExists(possible_old_system_shortcut))
+ if (base::PathExists(possible_old_system_shortcut))
base::CopyFile(possible_old_system_shortcut, new_shortcut_path);
}
}
diff --git a/chrome/browser/renderer_host/pepper/device_id_fetcher.cc b/chrome/browser/renderer_host/pepper/device_id_fetcher.cc
index a21b285..39380db 100644
--- a/chrome/browser/renderer_host/pepper/device_id_fetcher.cc
+++ b/chrome/browser/renderer_host/pepper/device_id_fetcher.cc
@@ -167,7 +167,7 @@ void DeviceIDFetcher::ComputeOnBlockingPool(const base::FilePath& profile_path,
// First check if the legacy device ID file exists on ChromeOS. If it does, we
// should just return that.
base::FilePath id_path = GetLegacyDeviceIDPath(profile_path);
- if (file_util::PathExists(id_path)) {
+ if (base::PathExists(id_path)) {
if (file_util::ReadFileToString(id_path, &id) && !id.empty()) {
RunCallbackOnIOThread(id);
return;
diff --git a/chrome/browser/safe_browsing/download_feedback_service_unittest.cc b/chrome/browser/safe_browsing/download_feedback_service_unittest.cc
index a912a3f..167e622 100644
--- a/chrome/browser/safe_browsing/download_feedback_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_feedback_service_unittest.cc
@@ -229,7 +229,7 @@ TEST_F(DownloadFeedbackServiceTest, SingleFeedbackComplete) {
// File should still exist since our FakeDownloadFeedback does not delete it.
base::RunLoop().RunUntilIdle();
- EXPECT_TRUE(file_util::PathExists(file_path));
+ EXPECT_TRUE(base::PathExists(file_path));
}
TEST_F(DownloadFeedbackServiceTest, MultiplePendingFeedbackComplete) {
@@ -296,9 +296,9 @@ TEST_F(DownloadFeedbackServiceTest, MultiplePendingFeedbackComplete) {
base::RunLoop().RunUntilIdle();
// These files should still exist since the FakeDownloadFeedback does not
// delete them.
- EXPECT_TRUE(file_util::PathExists(file_path[0]));
- EXPECT_TRUE(file_util::PathExists(file_path[1]));
- EXPECT_TRUE(file_util::PathExists(file_path[2]));
+ EXPECT_TRUE(base::PathExists(file_path[0]));
+ EXPECT_TRUE(base::PathExists(file_path[1]));
+ EXPECT_TRUE(base::PathExists(file_path[2]));
}
TEST_F(DownloadFeedbackServiceTest, MultiFeedbackWithIncomplete) {
@@ -361,17 +361,17 @@ TEST_F(DownloadFeedbackServiceTest, MultiFeedbackWithIncomplete) {
EXPECT_EQ(2U, num_feedbacks());
// File should still exist since the FileUtilProxy task hasn't run yet.
- EXPECT_TRUE(file_util::PathExists(file_path[2]));
+ EXPECT_TRUE(base::PathExists(file_path[2]));
base::RunLoop().RunUntilIdle();
// File should be deleted since the AcquireFileCallback ran after the service
// was deleted.
- EXPECT_FALSE(file_util::PathExists(file_path[2]));
+ EXPECT_FALSE(base::PathExists(file_path[2]));
// These files should still exist since the FakeDownloadFeedback does not
// delete them.
- EXPECT_TRUE(file_util::PathExists(file_path[0]));
- EXPECT_TRUE(file_util::PathExists(file_path[1]));
+ EXPECT_TRUE(base::PathExists(file_path[0]));
+ EXPECT_TRUE(base::PathExists(file_path[1]));
}
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/download_feedback_unittest.cc b/chrome/browser/safe_browsing/download_feedback_unittest.cc
index 0054a69..3edc8bd 100644
--- a/chrome/browser/safe_browsing/download_feedback_unittest.cc
+++ b/chrome/browser/safe_browsing/download_feedback_unittest.cc
@@ -192,14 +192,14 @@ TEST_F(DownloadFeedbackTest, CompleteUpload) {
uploader()->metadata_);
EXPECT_EQ(kTestFeedbackURL, uploader()->base_url_.spec());
- EXPECT_TRUE(file_util::PathExists(upload_file_path_));
+ EXPECT_TRUE(base::PathExists(upload_file_path_));
EXPECT_FALSE(feedback_finish_called_);
uploader()->finish_callback_.Run(
TwoPhaseUploader::STATE_SUCCESS, net::OK, 0, "");
EXPECT_TRUE(feedback_finish_called_);
base::RunLoop().RunUntilIdle();
- EXPECT_FALSE(file_util::PathExists(upload_file_path_));
+ EXPECT_FALSE(base::PathExists(upload_file_path_));
}
TEST_F(DownloadFeedbackTest, CancelUpload) {
@@ -230,13 +230,13 @@ TEST_F(DownloadFeedbackTest, CancelUpload) {
ASSERT_TRUE(uploader());
EXPECT_FALSE(feedback_finish_called_);
EXPECT_TRUE(uploader()->start_called_);
- EXPECT_TRUE(file_util::PathExists(upload_file_path_));
+ EXPECT_TRUE(base::PathExists(upload_file_path_));
delete feedback;
EXPECT_FALSE(feedback_finish_called_);
base::RunLoop().RunUntilIdle();
- EXPECT_FALSE(file_util::PathExists(upload_file_path_));
+ EXPECT_FALSE(base::PathExists(upload_file_path_));
}
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
index 3b61ce7..b81e0b0 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
@@ -1126,7 +1126,7 @@ TEST_F(SafeBrowsingDatabaseTest, DISABLED_FileCorruptionHandling) {
database_->UpdateFinished(true);
// Database file still exists until the corruption handler has run.
- EXPECT_TRUE(file_util::PathExists(database_filename_));
+ EXPECT_TRUE(base::PathExists(database_filename_));
// Flush through the corruption-handler task.
VLOG(1) << "Expect failed check on: SafeBrowsing database reset";
@@ -1134,13 +1134,13 @@ TEST_F(SafeBrowsingDatabaseTest, DISABLED_FileCorruptionHandling) {
}
// Database file should not exist.
- EXPECT_FALSE(file_util::PathExists(database_filename_));
+ EXPECT_FALSE(base::PathExists(database_filename_));
// Run the update again successfully.
EXPECT_TRUE(database_->UpdateStarted(&lists));
database_->InsertChunks(safe_browsing_util::kMalwareList, chunks);
database_->UpdateFinished(true);
- EXPECT_TRUE(file_util::PathExists(database_filename_));
+ EXPECT_TRUE(base::PathExists(database_filename_));
database_.reset();
}
@@ -1647,7 +1647,7 @@ TEST_F(SafeBrowsingDatabaseTest, FilterFile) {
// After re-creating the database, it should have a filter read from
// a file, so it should find the same results.
- ASSERT_TRUE(file_util::PathExists(filter_file));
+ ASSERT_TRUE(base::PathExists(filter_file));
database_.reset(new SafeBrowsingDatabaseNew);
database_->Init(database_filename_);
EXPECT_TRUE(database_->ContainsBrowseUrl(
@@ -1659,7 +1659,7 @@ TEST_F(SafeBrowsingDatabaseTest, FilterFile) {
// If there is no filter file, the database cannot find malware urls.
base::Delete(filter_file, false);
- ASSERT_FALSE(file_util::PathExists(filter_file));
+ ASSERT_FALSE(base::PathExists(filter_file));
database_.reset(new SafeBrowsingDatabaseNew);
database_->Init(database_filename_);
EXPECT_FALSE(database_->ContainsBrowseUrl(
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
index a435585..1cdc96c 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -895,7 +895,7 @@ class SafeBrowsingDatabaseManagerCookieTest : public InProcessBrowserTest {
virtual bool SetUpUserDataDirectory() OVERRIDE {
base::FilePath cookie_path(
SafeBrowsingService::GetCookieFilePathForTesting());
- EXPECT_FALSE(file_util::PathExists(cookie_path));
+ EXPECT_FALSE(base::PathExists(cookie_path));
base::FilePath test_dir;
if (!PathService::Get(chrome::DIR_TEST_DATA, &test_dir)) {
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file.cc b/chrome/browser/safe_browsing/safe_browsing_store_file.cc
index 234716c..50cacb3 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_file.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_store_file.cc
@@ -179,7 +179,7 @@ void SafeBrowsingStoreFile::CheckForOriginalAndDelete(
const base::FilePath& current_filename) {
const base::FilePath original_filename(
current_filename.DirName().AppendASCII("Safe Browsing"));
- if (file_util::PathExists(original_filename)) {
+ if (base::PathExists(original_filename)) {
int64 size = 0;
if (file_util::GetFileSize(original_filename, &size)) {
UMA_HISTOGRAM_COUNTS("SB2.OldDatabaseKilobytes",
@@ -406,7 +406,7 @@ bool SafeBrowsingStoreFile::BeginUpdate() {
if (empty_) {
// If the file exists but cannot be opened, try to delete it (not
// deleting directly, the bloom filter needs to be deleted, too).
- if (file_util::PathExists(filename_))
+ if (base::PathExists(filename_))
return OnCorruptDatabase();
new_file_.swap(new_file);
@@ -655,7 +655,7 @@ bool SafeBrowsingStoreFile::DoUpdate(
// Close the file handle and swizzle the file into place.
new_file_.reset();
if (!base::Delete(filename_, false) &&
- file_util::PathExists(filename_))
+ base::PathExists(filename_))
return false;
const base::FilePath new_filename = TemporaryFileForFilename(filename_);
@@ -736,14 +736,14 @@ void SafeBrowsingStoreFile::DeleteSubChunk(int32 chunk_id) {
// static
bool SafeBrowsingStoreFile::DeleteStore(const base::FilePath& basename) {
if (!base::Delete(basename, false) &&
- file_util::PathExists(basename)) {
+ base::PathExists(basename)) {
NOTREACHED();
return false;
}
const base::FilePath new_filename = TemporaryFileForFilename(basename);
if (!base::Delete(new_filename, false) &&
- file_util::PathExists(new_filename)) {
+ base::PathExists(new_filename)) {
NOTREACHED();
return false;
}
@@ -753,7 +753,7 @@ bool SafeBrowsingStoreFile::DeleteStore(const base::FilePath& basename) {
// also removed.
const base::FilePath journal_filename(
basename.value() + FILE_PATH_LITERAL("-journal"));
- if (file_util::PathExists(journal_filename))
+ if (base::PathExists(journal_filename))
base::Delete(journal_filename, false);
return true;
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc
index 89eec6f..3470736 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc
@@ -57,24 +57,24 @@ TEST_F(SafeBrowsingStoreFileTest, DeleteTemp) {
const base::FilePath temp_file =
SafeBrowsingStoreFile::TemporaryFileForFilename(filename_);
- EXPECT_FALSE(file_util::PathExists(filename_));
- EXPECT_FALSE(file_util::PathExists(temp_file));
+ EXPECT_FALSE(base::PathExists(filename_));
+ EXPECT_FALSE(base::PathExists(temp_file));
// Starting a transaction creates a temporary file.
EXPECT_TRUE(store_->BeginUpdate());
- EXPECT_TRUE(file_util::PathExists(temp_file));
+ EXPECT_TRUE(base::PathExists(temp_file));
// Pull the rug out from under the existing store, simulating a
// crash.
store_.reset(new SafeBrowsingStoreFile());
store_->Init(filename_, base::Closure());
- EXPECT_FALSE(file_util::PathExists(filename_));
- EXPECT_TRUE(file_util::PathExists(temp_file));
+ EXPECT_FALSE(base::PathExists(filename_));
+ EXPECT_TRUE(base::PathExists(temp_file));
// Make sure the temporary file is deleted.
EXPECT_TRUE(store_->Delete());
- EXPECT_FALSE(file_util::PathExists(filename_));
- EXPECT_FALSE(file_util::PathExists(temp_file));
+ EXPECT_FALSE(base::PathExists(filename_));
+ EXPECT_FALSE(base::PathExists(temp_file));
}
// Test basic corruption-handling.
@@ -133,7 +133,7 @@ TEST_F(SafeBrowsingStoreFileTest, DetectsCorruption) {
TEST_F(SafeBrowsingStoreFileTest, CheckValidity) {
// Empty store is valid.
- EXPECT_FALSE(file_util::PathExists(filename_));
+ EXPECT_FALSE(base::PathExists(filename_));
ASSERT_TRUE(store_->BeginUpdate());
EXPECT_FALSE(corruption_detected_);
EXPECT_TRUE(store_->CheckValidity());
@@ -141,9 +141,9 @@ TEST_F(SafeBrowsingStoreFileTest, CheckValidity) {
EXPECT_TRUE(store_->CancelUpdate());
// A store with some data is valid.
- EXPECT_FALSE(file_util::PathExists(filename_));
+ EXPECT_FALSE(base::PathExists(filename_));
SafeBrowsingStoreTestStorePrefix(store_.get());
- EXPECT_TRUE(file_util::PathExists(filename_));
+ EXPECT_TRUE(base::PathExists(filename_));
ASSERT_TRUE(store_->BeginUpdate());
EXPECT_FALSE(corruption_detected_);
EXPECT_TRUE(store_->CheckValidity());
@@ -154,7 +154,7 @@ TEST_F(SafeBrowsingStoreFileTest, CheckValidity) {
// Corrupt the payload.
TEST_F(SafeBrowsingStoreFileTest, CheckValidityPayload) {
SafeBrowsingStoreTestStorePrefix(store_.get());
- EXPECT_TRUE(file_util::PathExists(filename_));
+ EXPECT_TRUE(base::PathExists(filename_));
// 37 is the most random prime number. It's also past the header,
// as corrupting the header would fail BeginUpdate() in which case
@@ -176,7 +176,7 @@ TEST_F(SafeBrowsingStoreFileTest, CheckValidityPayload) {
// Corrupt the checksum.
TEST_F(SafeBrowsingStoreFileTest, CheckValidityChecksum) {
SafeBrowsingStoreTestStorePrefix(store_.get());
- EXPECT_TRUE(file_util::PathExists(filename_));
+ EXPECT_TRUE(base::PathExists(filename_));
// An offset from the end of the file which is in the checksum.
const int kOffset = -static_cast<int>(sizeof(base::MD5Digest));
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_unittest_helper.cc b/chrome/browser/safe_browsing/safe_browsing_store_unittest_helper.cc
index acb34b2..48f5e80 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_unittest_helper.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_store_unittest_helper.cc
@@ -320,7 +320,7 @@ void SafeBrowsingStoreTestDeleteChunks(SafeBrowsingStore* store) {
void SafeBrowsingStoreTestDelete(SafeBrowsingStore* store,
const base::FilePath& filename) {
// Delete should work if the file wasn't there in the first place.
- EXPECT_FALSE(file_util::PathExists(filename));
+ EXPECT_FALSE(base::PathExists(filename));
EXPECT_TRUE(store->Delete());
// Create a store file.
@@ -345,7 +345,7 @@ void SafeBrowsingStoreTestDelete(SafeBrowsingStore* store,
&add_prefixes_result,
&add_full_hashes_result));
- EXPECT_TRUE(file_util::PathExists(filename));
+ EXPECT_TRUE(base::PathExists(filename));
EXPECT_TRUE(store->Delete());
- EXPECT_FALSE(file_util::PathExists(filename));
+ EXPECT_FALSE(base::PathExists(filename));
}
diff --git a/chrome/browser/search_engines/template_url_fetcher_unittest.cc b/chrome/browser/search_engines/template_url_fetcher_unittest.cc
index 9120251..5e8dffe 100644
--- a/chrome/browser/search_engines/template_url_fetcher_unittest.cc
+++ b/chrome/browser/search_engines/template_url_fetcher_unittest.cc
@@ -145,7 +145,7 @@ void TemplateURLFetcherTest::StartDownload(
base::FilePath osdd_full_path;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &osdd_full_path));
osdd_full_path = osdd_full_path.AppendASCII(osdd_file_name);
- ASSERT_TRUE(file_util::PathExists(osdd_full_path));
+ ASSERT_TRUE(base::PathExists(osdd_full_path));
ASSERT_FALSE(file_util::DirectoryExists(osdd_full_path));
}
diff --git a/chrome/browser/search_engines/template_url_parser_unittest.cc b/chrome/browser/search_engines/template_url_parser_unittest.cc
index ae11ecb..3905a3a 100644
--- a/chrome/browser/search_engines/template_url_parser_unittest.cc
+++ b/chrome/browser/search_engines/template_url_parser_unittest.cc
@@ -77,7 +77,7 @@ TemplateURLParserTest::~TemplateURLParserTest() {
void TemplateURLParserTest::SetUp() {
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &full_path_));
full_path_ = full_path_.AppendASCII("osdd");
- if (!file_util::PathExists(full_path_)) {
+ if (!base::PathExists(full_path_)) {
LOG(ERROR) <<
"This test can't be run without some non-redistributable data";
full_path_ = base::FilePath();
@@ -95,7 +95,7 @@ void TemplateURLParserTest::ParseFile(
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &full_path));
full_path = full_path.AppendASCII("osdd");
full_path = full_path.AppendASCII(file_name);
- ASSERT_TRUE(file_util::PathExists(full_path));
+ ASSERT_TRUE(base::PathExists(full_path));
std::string contents;
ASSERT_TRUE(file_util::ReadFileToString(full_path, &contents));
diff --git a/chrome/browser/sessions/session_backend.cc b/chrome/browser/sessions/session_backend.cc
index 90e6a38..19431d8 100644
--- a/chrome/browser/sessions/session_backend.cc
+++ b/chrome/browser/sessions/session_backend.cc
@@ -47,7 +47,7 @@ class SessionFileReader {
buffer_position_(0),
available_count_(0) {
file_.reset(new net::FileStream(NULL));
- if (file_util::PathExists(path))
+ if (base::PathExists(path))
file_->OpenSync(path,
base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ);
}
@@ -274,9 +274,9 @@ void SessionBackend::MoveCurrentSessionToLastSession() {
const base::FilePath current_session_path = GetCurrentSessionPath();
const base::FilePath last_session_path = GetLastSessionPath();
- if (file_util::PathExists(last_session_path))
+ if (base::PathExists(last_session_path))
base::Delete(last_session_path, false);
- if (file_util::PathExists(current_session_path)) {
+ if (base::PathExists(current_session_path)) {
int64 file_size;
if (file_util::GetFileSize(current_session_path, &file_size)) {
if (type_ == BaseSessionService::TAB_RESTORE) {
@@ -290,7 +290,7 @@ void SessionBackend::MoveCurrentSessionToLastSession() {
last_session_valid_ = base::Move(current_session_path, last_session_path);
}
- if (file_util::PathExists(current_session_path))
+ if (base::PathExists(current_session_path))
base::Delete(current_session_path, false);
// Create and open the file for the current session.
diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc
index 4551315..505d87b 100644
--- a/chrome/browser/shell_integration.cc
+++ b/chrome/browser/shell_integration.cc
@@ -79,7 +79,7 @@ CommandLine ShellIntegration::CommandLineArgsForLauncher(
if (!user_data_dir.empty()) {
// Make sure user_data_dir is an absolute path.
user_data_dir = base::MakeAbsoluteFilePath(user_data_dir);
- if (!user_data_dir.empty() && file_util::PathExists(user_data_dir))
+ if (!user_data_dir.empty() && base::PathExists(user_data_dir))
new_cmd_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir);
}
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc
index b84d295..3a692a9 100644
--- a/chrome/browser/shell_integration_linux.cc
+++ b/chrome/browser/shell_integration_linux.cc
@@ -552,7 +552,7 @@ ShellIntegration::ShortcutLocations GetExistingShortcutLocations(
// Determine whether there is a shortcut on desktop.
if (!desktop_path.empty()) {
locations.on_desktop =
- file_util::PathExists(desktop_path.Append(shortcut_filename));
+ base::PathExists(desktop_path.Append(shortcut_filename));
}
// Determine whether there is a shortcut in the applications directory.
@@ -605,7 +605,7 @@ bool GetExistingShortcutContents(base::Environment* env,
i != search_paths.end(); ++i) {
base::FilePath path = i->Append("applications").Append(desktop_filename);
VLOG(1) << "Looking for desktop file in " << path.value();
- if (file_util::PathExists(path)) {
+ if (base::PathExists(path)) {
VLOG(1) << "Found desktop file at " << path.value();
return file_util::ReadFileToString(path, output);
}
@@ -627,7 +627,7 @@ base::FilePath GetWebShortcutFilename(const GURL& url) {
base::FilePath filepath = desktop_path.Append(filename);
base::FilePath alternative_filepath(filepath.value() + ".desktop");
for (size_t i = 1; i < 100; ++i) {
- if (file_util::PathExists(base::FilePath(alternative_filepath))) {
+ if (base::PathExists(base::FilePath(alternative_filepath))) {
alternative_filepath = base::FilePath(
filepath.value() + "_" + base::IntToString(i) + ".desktop");
} else {
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index c30dc78..eb37324 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -530,7 +530,7 @@ base::FilePath ShellIntegration::GetStartMenuShortcut(
shortcut = shortcut.Append(shortcut_name).Append(shortcut_name +
installer::kLnkExt);
- if (file_util::PathExists(shortcut))
+ if (base::PathExists(shortcut))
return shortcut;
}
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
index cc3db9a..c5c8163 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
@@ -96,7 +96,7 @@ void LoadDictionaryFileReliably(WordList& custom_words,
return;
// Checksum is not valid. See if there's a backup.
base::FilePath backup = path.AddExtension(BACKUP_EXTENSION);
- if (!file_util::PathExists(backup))
+ if (!base::PathExists(backup))
return;
// Load the backup and verify its checksum.
if (LoadFile(backup, custom_words) != VALID_CHECKSUM)
diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
index a6f5169..67dc923 100644
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
@@ -80,7 +80,7 @@ scoped_ptr<DictionaryFile> OpenDictionaryFile(
base::FilePath user_dir;
PathService::Get(chrome::DIR_USER_DATA, &user_dir);
base::FilePath fallback = user_dir.Append(file->path.BaseName());
- if (!file_util::PathExists(file->path) && file_util::PathExists(fallback))
+ if (!base::PathExists(file->path) && base::PathExists(fallback))
file->path = fallback;
#endif
@@ -89,7 +89,7 @@ scoped_ptr<DictionaryFile> OpenDictionaryFile(
bool bdict_is_valid;
{
base::MemoryMappedFile map;
- bdict_is_valid = file_util::PathExists(file->path) &&
+ bdict_is_valid = base::PathExists(file->path) &&
map.Initialize(file->path) &&
hunspell::BDict::Verify(reinterpret_cast<const char*>(map.data()),
map.length());
diff --git a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
index 5130600..45754ce 100644
--- a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
+++ b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
@@ -78,7 +78,7 @@ IN_PROC_BROWSER_TEST_F(SpellcheckServiceBrowserTest, DeleteCorruptedBDICT) {
content::RunAllPendingInMessageLoop(content::BrowserThread::UI);
EXPECT_EQ(SpellcheckService::BDICT_CORRUPTED,
SpellcheckService::GetStatusEvent());
- if (file_util::PathExists(bdict_path)) {
+ if (base::PathExists(bdict_path)) {
ADD_FAILURE();
EXPECT_TRUE(base::Delete(bdict_path, true));
}
diff --git a/chrome/browser/storage_monitor/media_storage_util.cc b/chrome/browser/storage_monitor/media_storage_util.cc
index 785440c..76d39f7 100644
--- a/chrome/browser/storage_monitor/media_storage_util.cc
+++ b/chrome/browser/storage_monitor/media_storage_util.cc
@@ -44,7 +44,7 @@ void ValidatePathOnFileThread(
const base::Callback<void(bool)>& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(callback, file_util::PathExists(path)));
+ base::Bind(callback, base::PathExists(path)));
}
typedef std::vector<StorageInfo> StorageInfoList;
@@ -79,7 +79,7 @@ void FilterAttachedDevicesOnFileThread(MediaStorageUtil::DeviceIdSet* devices) {
if (type == StorageInfo::FIXED_MASS_STORAGE ||
type == StorageInfo::ITUNES ||
type == StorageInfo::PICASA) {
- if (!file_util::PathExists(base::FilePath::FromUTF8Unsafe(unique_id)))
+ if (!base::PathExists(base::FilePath::FromUTF8Unsafe(unique_id)))
missing_devices.insert(*it);
continue;
}
diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc
index a075a64..f1ddbe7 100644
--- a/chrome/browser/sync/profile_sync_service_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc
@@ -465,11 +465,11 @@ TEST_F(ProfileSyncServiceTest, TestStartupWithOldSyncData) {
harness_.service.reset();
// This file should have been deleted when the whole directory was nuked.
- ASSERT_FALSE(file_util::PathExists(sync_file3));
- ASSERT_FALSE(file_util::PathExists(sync_file1));
+ ASSERT_FALSE(base::PathExists(sync_file3));
+ ASSERT_FALSE(base::PathExists(sync_file1));
// This will still exist, but the text should have changed.
- ASSERT_TRUE(file_util::PathExists(sync_file2));
+ ASSERT_TRUE(base::PathExists(sync_file2));
std::string file2text;
ASSERT_TRUE(file_util::ReadFileToString(sync_file2, &file2text));
ASSERT_NE(file2text.compare(nonsense2), 0);
diff --git a/chrome/browser/sync/test/integration/sync_extension_helper.cc b/chrome/browser/sync/test/integration/sync_extension_helper.cc
index 151020b..62204bf 100644
--- a/chrome/browser/sync/test/integration/sync_extension_helper.cc
+++ b/chrome/browser/sync/test/integration/sync_extension_helper.cc
@@ -305,7 +305,7 @@ scoped_refptr<Extension> CreateExtension(const base::FilePath& base_dir,
}
const base::FilePath sub_dir = base::FilePath().AppendASCII(name);
base::FilePath extension_dir;
- if (!file_util::PathExists(base_dir) &&
+ if (!base::PathExists(base_dir) &&
!file_util::CreateDirectory(base_dir)) {
ADD_FAILURE();
return NULL;
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc
index 8d75d64..02fe845 100644
--- a/chrome/browser/sync/test/integration/sync_test.cc
+++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -220,7 +220,7 @@ Profile* SyncTest::MakeProfile(const base::FilePath::StringType name) {
PathService::Get(chrome::DIR_USER_DATA, &path);
path = path.Append(name);
- if (!file_util::PathExists(path))
+ if (!base::PathExists(path))
CHECK(file_util::CreateDirectory(path));
Profile* profile =
diff --git a/chrome/browser/ui/app_list/app_list_service_mac.mm b/chrome/browser/ui/app_list/app_list_service_mac.mm
index 42e5432..be91494 100644
--- a/chrome/browser/ui/app_list/app_list_service_mac.mm
+++ b/chrome/browser/ui/app_list/app_list_service_mac.mm
@@ -178,7 +178,7 @@ void CheckAppListShimOnFileThread(const base::FilePath& profile_path) {
CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAppListShim);
base::FilePath install_path = web_app::GetAppInstallPath(
GetAppListShortcutInfo(profile_path));
- if (enable == file_util::PathExists(install_path))
+ if (enable == base::PathExists(install_path))
return;
if (enable) {
diff --git a/chrome/browser/ui/ash/screenshot_taker_unittest.cc b/chrome/browser/ui/ash/screenshot_taker_unittest.cc
index d91ef4a..a73eb37 100644
--- a/chrome/browser/ui/ash/screenshot_taker_unittest.cc
+++ b/chrome/browser/ui/ash/screenshot_taker_unittest.cc
@@ -129,7 +129,7 @@ TEST_F(ScreenshotTakerTest, TakeScreenshot) {
EXPECT_EQ(ScreenshotTakerObserver::SCREENSHOT_SUCCESS, screenshot_result_);
if (ScreenshotTakerObserver::SCREENSHOT_SUCCESS == screenshot_result_)
- EXPECT_TRUE(file_util::PathExists(screenshot_path_));
+ EXPECT_TRUE(base::PathExists(screenshot_path_));
}
} // namespace test
diff --git a/chrome/browser/ui/metro_pin_tab_helper_win.cc b/chrome/browser/ui/metro_pin_tab_helper_win.cc
index 8bc6dd7..6dca58f 100644
--- a/chrome/browser/ui/metro_pin_tab_helper_win.cc
+++ b/chrome/browser/ui/metro_pin_tab_helper_win.cc
@@ -124,7 +124,7 @@ bool GetPathToBackupLogo(const base::FilePath& logo_dir,
base::FilePath* logo_path) {
const wchar_t kDefaultLogoFileName[] = L"SecondaryTile.png";
*logo_path = logo_dir.Append(kDefaultLogoFileName);
- if (file_util::PathExists(*logo_path))
+ if (base::PathExists(*logo_path))
return true;
base::FilePath default_logo_path;
diff --git a/chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc b/chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc
index 92b4f91..d6cd780 100644
--- a/chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc
+++ b/chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc
@@ -35,7 +35,7 @@ class PrefsTabHelperBrowserTest : public InProcessBrowserTest {
return false;
}
base::FilePath non_global_pref_file = GetPreferencesFilePath();
- if (!file_util::PathExists(non_global_pref_file)) {
+ if (!base::PathExists(non_global_pref_file)) {
LOG(ERROR) << "Doesn't exist " << non_global_pref_file.MaybeAsASCII();
return false;
}
diff --git a/chrome/browser/ui/views/app_list/app_list_controller_win.cc b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
index d459a01..37568a6 100644
--- a/chrome/browser/ui/views/app_list/app_list_controller_win.cc
+++ b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
@@ -224,7 +224,7 @@ void CreateAppListShortcuts(
base::FilePath shortcut_file =
shortcut_paths[i].Append(app_list_shortcut_name).
AddExtension(installer::kLnkExt);
- if (!file_util::PathExists(shortcut_file.DirName()) &&
+ if (!base::PathExists(shortcut_file.DirName()) &&
!file_util::CreateDirectory(shortcut_file.DirName())) {
NOTREACHED();
return;
diff --git a/chrome/browser/ui/views/avatar_menu_button_browsertest.cc b/chrome/browser/ui/views/avatar_menu_button_browsertest.cc
index 611995e..a1c9cc0 100644
--- a/chrome/browser/ui/views/avatar_menu_button_browsertest.cc
+++ b/chrome/browser/ui/views/avatar_menu_button_browsertest.cc
@@ -74,7 +74,7 @@ void AvatarMenuButtonTest::CreateTestingProfile() {
base::FilePath path;
PathService::Get(chrome::DIR_USER_DATA, &path);
path = path.AppendASCII("test_profile");
- if (!file_util::PathExists(path))
+ if (!base::PathExists(path))
ASSERT_TRUE(file_util::CreateDirectory(path));
Profile* profile =
Profile::CreateProfile(path, NULL, Profile::CREATE_MODE_SYNCHRONOUS);
diff --git a/chrome/browser/ui/views/extensions/native_app_window_views.cc b/chrome/browser/ui/views/extensions/native_app_window_views.cc
index 8d5433a..a7cc935 100644
--- a/chrome/browser/ui/views/extensions/native_app_window_views.cc
+++ b/chrome/browser/ui/views/extensions/native_app_window_views.cc
@@ -106,7 +106,7 @@ void CreateIconAndSetRelaunchDetails(
ui::win::SetRelaunchDetailsForWindow(command_line.GetCommandLineString(),
shortcut_info.title, hwnd);
- if (!file_util::PathExists(web_app_path) &&
+ if (!base::PathExists(web_app_path) &&
!file_util::CreateDirectory(web_app_path)) {
return;
}
diff --git a/chrome/browser/ui/web_applications/web_app_ui.cc b/chrome/browser/ui/web_applications/web_app_ui.cc
index d24c6ac..1cc9584 100644
--- a/chrome/browser/ui/web_applications/web_app_ui.cc
+++ b/chrome/browser/ui/web_applications/web_app_ui.cc
@@ -260,7 +260,7 @@ void UpdateShortcutWorker::CheckExistingShortcuts() {
base::FilePath shortcut_file = path.Append(file_name_).
ReplaceExtension(FILE_PATH_LITERAL(".lnk"));
- if (file_util::PathExists(shortcut_file)) {
+ if (base::PathExists(shortcut_file)) {
shortcut_files_.push_back(shortcut_file);
}
}
@@ -280,7 +280,7 @@ void UpdateShortcutWorker::UpdateShortcutsOnFileThread() {
// Ensure web_app_path exists. web_app_path could be missing for a legacy
// shortcut created by Gears.
- if (!file_util::PathExists(web_app_path) &&
+ if (!base::PathExists(web_app_path) &&
!file_util::CreateDirectory(web_app_path)) {
NOTREACHED();
return;
diff --git a/chrome/browser/ui/webui/nacl_ui.cc b/chrome/browser/ui/webui/nacl_ui.cc
index d8da413..744d9cf 100644
--- a/chrome/browser/ui/webui/nacl_ui.cc
+++ b/chrome/browser/ui/webui/nacl_ui.cc
@@ -162,7 +162,7 @@ void NaClDomHandlerProxy::ValidatePnaclPath() {
// However, do not trust that the path returned by the PathService exists.
// Check for existence here.
ValidatePnaclPathCallback(
- got_path && !pnacl_path.empty() && file_util::PathExists(pnacl_path));
+ got_path && !pnacl_path.empty() && base::PathExists(pnacl_path));
}
void NaClDomHandlerProxy::ValidatePnaclPathCallback(bool is_valid) {
diff --git a/chrome/browser/ui/webui/options/advanced_options_utils_x11.cc b/chrome/browser/ui/webui/options/advanced_options_utils_x11.cc
index b568e93..bbe55c8 100644
--- a/chrome/browser/ui/webui/options/advanced_options_utils_x11.cc
+++ b/chrome/browser/ui/webui/options/advanced_options_utils_x11.cc
@@ -82,7 +82,7 @@ bool StartProxyConfigUtil(const char* command[]) {
bool found = false;
for (size_t i = 0; i < paths.size(); ++i) {
base::FilePath file(paths[i]);
- if (file_util::PathExists(file.Append(command[0]))) {
+ if (base::PathExists(file.Append(command[0]))) {
found = true;
break;
}
diff --git a/chrome/browser/upload_list.cc b/chrome/browser/upload_list.cc
index 52c42a7..3f618aa 100644
--- a/chrome/browser/upload_list.cc
+++ b/chrome/browser/upload_list.cc
@@ -49,7 +49,7 @@ void UploadList::LoadUploadListAndInformDelegateOfCompletion() {
}
void UploadList::LoadUploadList() {
- if (file_util::PathExists(upload_log_path_)) {
+ if (base::PathExists(upload_log_path_)) {
std::string contents;
file_util::ReadFileToString(upload_log_path_, &contents);
std::vector<std::string> log_entries;
diff --git a/chrome/browser/user_data_dir_extractor_win.cc b/chrome/browser/user_data_dir_extractor_win.cc
index 793991a..e295885 100644
--- a/chrome/browser/user_data_dir_extractor_win.cc
+++ b/chrome/browser/user_data_dir_extractor_win.cc
@@ -45,7 +45,7 @@ base::FilePath GetUserDataDir(const content::MainFunctionParams& parameters) {
// prompt the user to pick a different directory, and restart chrome with
// the new dir.
// http://code.google.com/p/chromium/issues/detail?id=11510
- if (!file_util::PathExists(user_data_dir)) {
+ if (!base::PathExists(user_data_dir)) {
#if defined(USE_AURA)
// TODO(beng):
NOTIMPLEMENTED();
diff --git a/chrome/browser/user_style_sheet_watcher.cc b/chrome/browser/user_style_sheet_watcher.cc
index dd7ab40..3ab2660 100644
--- a/chrome/browser/user_style_sheet_watcher.cc
+++ b/chrome/browser/user_style_sheet_watcher.cc
@@ -109,7 +109,7 @@ void UserStyleSheetLoader::LoadStyleSheet(
return;
}
// Create the file if it doesn't exist.
- if (!file_util::PathExists(style_sheet_file))
+ if (!base::PathExists(style_sheet_file))
file_util::WriteFile(style_sheet_file, "", 0);
std::string css;
diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm
index 354eaec..c085638 100644
--- a/chrome/browser/web_applications/web_app_mac.mm
+++ b/chrome/browser/web_applications/web_app_mac.mm
@@ -166,7 +166,7 @@ void LaunchShimOnFileThread(
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
base::FilePath shim_path = web_app::GetAppInstallPath(shortcut_info);
- if (shim_path.empty() || !file_util::PathExists(shim_path)) {
+ if (shim_path.empty() || !base::PathExists(shim_path)) {
// The user may have deleted the copy in the Applications folder, use the
// one in the web app's app_data_path.
base::FilePath app_data_path = web_app::GetWebAppDataDirectory(
@@ -174,7 +174,7 @@ void LaunchShimOnFileThread(
shim_path = app_data_path.Append(shim_path.BaseName());
}
- if (!file_util::PathExists(shim_path))
+ if (!base::PathExists(shim_path))
return;
CommandLine command_line(CommandLine::NO_PROGRAM);
@@ -377,7 +377,7 @@ bool WebAppShortcutCreator::UpdateShortcuts() {
// If the path does not exist, check if a matching bundle can be found
// elsewhere.
- if (dst_path.empty() || !file_util::PathExists(app_path))
+ if (dst_path.empty() || !base::PathExists(app_path))
app_path = GetAppBundleById(GetBundleIdentifier());
if (!app_path.empty()) {
diff --git a/chrome/browser/web_applications/web_app_mac_unittest.mm b/chrome/browser/web_applications/web_app_mac_unittest.mm
index a96ff4c..34ca570 100644
--- a/chrome/browser/web_applications/web_app_mac_unittest.mm
+++ b/chrome/browser/web_applications/web_app_mac_unittest.mm
@@ -85,8 +85,8 @@ TEST(WebAppShortcutCreatorTest, CreateShortcuts) {
EXPECT_CALL(shortcut_creator, RevealAppShimInFinder());
EXPECT_TRUE(shortcut_creator.CreateShortcuts());
- EXPECT_TRUE(file_util::PathExists(app_in_app_data_path_path));
- EXPECT_TRUE(file_util::PathExists(dst_path));
+ EXPECT_TRUE(base::PathExists(app_in_app_data_path_path));
+ EXPECT_TRUE(base::PathExists(dst_path));
EXPECT_EQ(dst_path.BaseName(), shortcut_creator.GetShortcutName());
base::FilePath plist_path = dst_path.Append("Contents").Append("Info.plist");
@@ -143,8 +143,8 @@ TEST(WebAppShortcutCreatorTest, UpdateShortcuts) {
other_folder.Append(app_name).Append("Contents"), true));
EXPECT_TRUE(shortcut_creator.UpdateShortcuts());
- EXPECT_FALSE(file_util::PathExists(dst_folder.Append(app_name)));
- EXPECT_TRUE(file_util::PathExists(
+ EXPECT_FALSE(base::PathExists(dst_folder.Append(app_name)));
+ EXPECT_TRUE(base::PathExists(
other_folder.Append(app_name).Append("Contents")));
// Also test case where GetAppBundleById fails.
@@ -157,8 +157,8 @@ TEST(WebAppShortcutCreatorTest, UpdateShortcuts) {
other_folder.Append(app_name).Append("Contents"), true));
EXPECT_FALSE(shortcut_creator.UpdateShortcuts());
- EXPECT_FALSE(file_util::PathExists(dst_folder.Append(app_name)));
- EXPECT_FALSE(file_util::PathExists(
+ EXPECT_FALSE(base::PathExists(dst_folder.Append(app_name)));
+ EXPECT_FALSE(base::PathExists(
other_folder.Append(app_name).Append("Contents")));
}
@@ -200,7 +200,7 @@ TEST(WebAppShortcutCreatorTest, RunShortcut) {
EXPECT_CALL(shortcut_creator, RevealAppShimInFinder());
EXPECT_TRUE(shortcut_creator.CreateShortcuts());
- EXPECT_TRUE(file_util::PathExists(dst_path));
+ EXPECT_TRUE(base::PathExists(dst_path));
ssize_t status = getxattr(
dst_path.value().c_str(), "com.apple.quarantine", NULL, 0, 0, 0);
diff --git a/chrome/browser/web_applications/web_app_win.cc b/chrome/browser/web_applications/web_app_win.cc
index 6e19753..34205ff 100644
--- a/chrome/browser/web_applications/web_app_win.cc
+++ b/chrome/browser/web_applications/web_app_win.cc
@@ -75,8 +75,8 @@ bool ShouldUpdateIcon(const base::FilePath& icon_file,
icon_file.ReplaceExtension(kIconChecksumFileExt));
// Returns true if icon_file or checksum file is missing.
- if (!file_util::PathExists(icon_file) ||
- !file_util::PathExists(checksum_file))
+ if (!base::PathExists(icon_file) ||
+ !base::PathExists(checksum_file))
return true;
base::MD5Digest persisted_image_checksum;
@@ -143,7 +143,7 @@ std::vector<base::FilePath> FindAppShortcutsByProfileAndTitle(
shortcut_file = shortcut_file.InsertBeforeExtensionASCII(
base::StringPrintf(" (%d)", i));
}
- if (file_util::PathExists(shortcut_file) &&
+ if (base::PathExists(shortcut_file) &&
IsAppShortcutForProfile(shortcut_file, profile_path)) {
shortcut_paths.push_back(shortcut_file);
}
@@ -166,7 +166,7 @@ bool CreateShortcutsInPaths(
web_app::ShortcutCreationPolicy creation_policy,
std::vector<base::FilePath>* out_filenames) {
// Ensure web_app_path exists.
- if (!file_util::PathExists(web_app_path) &&
+ if (!base::PathExists(web_app_path) &&
!file_util::CreateDirectory(web_app_path)) {
return false;
}
@@ -243,7 +243,7 @@ bool CreateShortcutsInPaths(
shortcut_properties.set_icon(icon_file, 0);
shortcut_properties.set_app_id(app_id);
shortcut_properties.set_dual_mode(false);
- if (!file_util::PathExists(shortcut_file.DirName()) &&
+ if (!base::PathExists(shortcut_file.DirName()) &&
!file_util::CreateDirectory(shortcut_file.DirName())) {
NOTREACHED();
return false;
@@ -444,7 +444,7 @@ void UpdatePlatformShortcuts(
// and let the shell know the icon has been modified.
base::FilePath icon_file = web_app_path.Append(file_name).AddExtension(
FILE_PATH_LITERAL(".ico"));
- if (file_util::PathExists(icon_file)) {
+ if (base::PathExists(icon_file)) {
web_app::internals::CheckAndSaveIcon(icon_file, shortcut_info.favicon);
}
}