summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-16 19:10:23 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-16 19:10:23 +0000
commitdd3aa79b68b6752e89a6be0af51506674925337a (patch)
treef70f4d0f405009fea8b53ad907d62184b45eaba0 /chrome
parent13816d3fcfe2e4e109752cf03fe15ebbaf23e85e (diff)
downloadchromium_src-dd3aa79b68b6752e89a6be0af51506674925337a.zip
chromium_src-dd3aa79b68b6752e89a6be0af51506674925337a.tar.gz
chromium_src-dd3aa79b68b6752e89a6be0af51506674925337a.tar.bz2
Rename base::Delete to base::DeleteFile
Also renames DeleteAfterReboot to DeleteFileAfterReboot, and removes FileUtilProxy::RecursiveDelete which was never called. BUG= R=shess@chromium.org Review URL: https://codereview.chromium.org/18584011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211822 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/android/crash_dump_manager.cc4
-rw-r--r--chrome/browser/browser_shutdown.cc2
-rw-r--r--chrome/browser/chrome_to_mobile_service.cc2
-rw-r--r--chrome/browser/chromeos/app_mode/kiosk_app_data.cc2
-rw-r--r--chrome/browser/chromeos/contacts/contact_database.cc2
-rw-r--r--chrome/browser/chromeos/drive/file_cache.cc10
-rw-r--r--chrome/browser/chromeos/drive/file_cache_metadata.cc2
-rw-r--r--chrome/browser/chromeos/drive/file_cache_unittest.cc2
-rw-r--r--chrome/browser/chromeos/drive/file_system/download_operation.cc4
-rw-r--r--chrome/browser/chromeos/drive/file_system_util.cc2
-rw-r--r--chrome/browser/chromeos/drive/resource_metadata_storage.cc4
-rw-r--r--chrome/browser/chromeos/imageburner/burn_manager.cc2
-rw-r--r--chrome/browser/chromeos/login/user_image_manager_impl.cc2
-rw-r--r--chrome/browser/chromeos/login/wallpaper_manager.cc8
-rw-r--r--chrome/browser/chromeos/policy/app_pack_updater.cc18
-rw-r--r--chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc2
-rw-r--r--chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc6
-rw-r--r--chrome/browser/chromeos/system/syslogs_provider.cc4
-rw-r--r--chrome/browser/chromeos/system/timezone_settings.cc2
-rw-r--r--chrome/browser/component_updater/component_unpacker.cc6
-rw-r--r--chrome/browser/component_updater/component_updater_service.cc2
-rw-r--r--chrome/browser/component_updater/pepper_flash_component_installer.cc2
-rw-r--r--chrome/browser/component_updater/pnacl/pnacl_component_installer.cc2
-rw-r--r--chrome/browser/component_updater/swiftshader_component_installer.cc2
-rw-r--r--chrome/browser/component_updater/test/test_installer.cc4
-rw-r--r--chrome/browser/component_updater/widevine_cdm_component_installer.cc4
-rw-r--r--chrome/browser/download/download_browsertest.cc2
-rw-r--r--chrome/browser/extensions/activity_log/activity_database_unittest.cc18
-rw-r--r--chrome/browser/extensions/api/developer_private/developer_private_api.cc2
-rw-r--r--chrome/browser/extensions/api/record/record_api_test.cc2
-rw-r--r--chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc4
-rw-r--r--chrome/browser/extensions/extension_browsertest.cc4
-rw-r--r--chrome/browser/extensions/extension_creator.cc4
-rw-r--r--chrome/browser/extensions/extension_service_unittest.cc16
-rw-r--r--chrome/browser/extensions/extension_startup_browsertest.cc6
-rw-r--r--chrome/browser/extensions/sandboxed_unpacker.cc4
-rw-r--r--chrome/browser/first_run/first_run.cc2
-rw-r--r--chrome/browser/first_run/first_run_browsertest.cc2
-rw-r--r--chrome/browser/google/google_update_settings_posix.cc2
-rw-r--r--chrome/browser/google_apis/base_requests_server_unittest.cc2
-rw-r--r--chrome/browser/google_apis/drive_api_requests_unittest.cc2
-rw-r--r--chrome/browser/google_apis/gdata_wapi_requests_unittest.cc2
-rw-r--r--chrome/browser/history/history_backend_unittest.cc6
-rw-r--r--chrome/browser/history/in_memory_url_index.cc2
-rw-r--r--chrome/browser/history/text_database_manager_unittest.cc2
-rw-r--r--chrome/browser/importer/firefox_importer_browsertest.cc2
-rw-r--r--chrome/browser/importer/firefox_profile_lock_posix.cc2
-rw-r--r--chrome/browser/jumplist_win.cc2
-rw-r--r--chrome/browser/media/webrtc_log_uploader_unittest.cc2
-rw-r--r--chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc8
-rw-r--r--chrome/browser/nacl_host/nacl_browser.cc2
-rw-r--r--chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc4
-rw-r--r--chrome/browser/net/net_log_temp_file_unittest.cc2
-rw-r--r--chrome/browser/net/url_fixer_upper_unittest.cc8
-rw-r--r--chrome/browser/page_cycler/page_cycler.cc2
-rw-r--r--chrome/browser/pepper_flash_settings_manager.cc2
-rw-r--r--chrome/browser/policy/cloud/resource_cache.cc10
-rw-r--r--chrome/browser/policy/cloud/user_cloud_policy_store.cc2
-rw-r--r--chrome/browser/printing/print_dialog_cloud.cc2
-rw-r--r--chrome/browser/printing/print_dialog_gtk.cc4
-rw-r--r--chrome/browser/printing/printing_layout_browsertest.cc4
-rw-r--r--chrome/browser/profiles/profile_info_cache.cc2
-rw-r--r--chrome/browser/profiles/profile_manager.cc4
-rw-r--r--chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc18
-rw-r--r--chrome/browser/profiles/profile_shortcut_manager_win.cc8
-rw-r--r--chrome/browser/safe_browsing/download_feedback.cc8
-rw-r--r--chrome/browser/safe_browsing/download_feedback_service.cc8
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database.cc12
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_unittest.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_store_file.cc12
-rw-r--r--chrome/browser/sessions/session_backend.cc6
-rw-r--r--chrome/browser/shell_integration_linux.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/storage_monitor_linux_unittest.cc4
-rw-r--r--chrome/browser/sync/glue/sync_backend_host.cc2
-rw-r--r--chrome/browser/ui/app_list/app_list_service_mac.mm2
-rw-r--r--chrome/browser/ui/network_profile_bubble.cc2
-rw-r--r--chrome/browser/ui/webui/net_internals/net_internals_ui.cc2
-rw-r--r--chrome/browser/value_store/leveldb_value_store.cc2
-rw-r--r--chrome/browser/web_applications/web_app_mac.mm10
-rw-r--r--chrome/browser/web_applications/web_app_mac_unittest.mm4
-rw-r--r--chrome/browser/web_applications/web_app_win.cc6
-rw-r--r--chrome/common/auto_start_linux.cc4
-rw-r--r--chrome/common/extensions/api/storage/storage_schema_manifest_handler_unittest.cc2
-rw-r--r--chrome/common/extensions/extension_file_util.cc12
-rw-r--r--chrome/common/extensions/extension_file_util_unittest.cc2
-rw-r--r--chrome/common/service_process_util_unittest.cc4
-rw-r--r--chrome/installer/setup/install.cc2
-rw-r--r--chrome/installer/setup/setup_main.cc2
-rw-r--r--chrome/installer/setup/setup_util_unittest.cc2
-rw-r--r--chrome/installer/setup/uninstall.cc16
-rw-r--r--chrome/installer/test/alternate_version_generator.cc8
-rw-r--r--chrome/installer/test/upgrade_test.cc2
-rw-r--r--chrome/installer/tools/validate_installation_main.cc2
-rw-r--r--chrome/installer/util/copy_tree_work_item.cc4
-rw-r--r--chrome/installer/util/copy_tree_work_item_unittest.cc2
-rw-r--r--chrome/installer/util/delete_after_reboot_helper_unittest.cc4
-rw-r--r--chrome/installer/util/delete_tree_work_item.cc4
-rw-r--r--chrome/installer/util/installer_state.cc2
-rw-r--r--chrome/installer/util/logging_installer.cc2
-rw-r--r--chrome/installer/util/master_preferences_unittest.cc6
-rw-r--r--chrome/installer/util/self_cleaning_temp_dir.cc2
-rw-r--r--chrome/installer/util/shell_util.cc4
-rw-r--r--chrome/service/cloud_print/connector_settings_unittest.cc2
-rw-r--r--chrome/test/automation/proxy_launcher.cc2
-rw-r--r--chrome/test/base/testing_profile.cc6
-rw-r--r--chrome/test/logging/win/test_log_collector.cc2
-rw-r--r--chrome/test/mini_installer_test/installer_test_util.cc2
-rw-r--r--chrome/test/mini_installer_test/run_all_unittests.cc2
-rw-r--r--chrome/test/perf/generate_profile.cc2
-rw-r--r--chrome/test/perf/memory_test.cc2
-rw-r--r--chrome/test/webdriver/webdriver_automation.cc2
-rw-r--r--chrome/tools/convert_dict/convert_dict_unittest.cc4
-rw-r--r--chrome/utility/media_galleries/pmp_test_helper.cc2
115 files changed, 241 insertions, 241 deletions
diff --git a/chrome/browser/android/crash_dump_manager.cc b/chrome/browser/android/crash_dump_manager.cc
index 6ee4e04..de2923e 100644
--- a/chrome/browser/android/crash_dump_manager.cc
+++ b/chrome/browser/android/crash_dump_manager.cc
@@ -91,7 +91,7 @@ void CrashDumpManager::ProcessMinidump(const base::FilePath& minidump_path,
if (file_size == 0) {
// Empty minidump, this process did not crash. Just remove the file.
- r = base::Delete(minidump_path, false);
+ r = base::DeleteFile(minidump_path, false);
DCHECK(r) << "Failed to delete temporary minidump file "
<< minidump_path.value();
return;
@@ -115,7 +115,7 @@ void CrashDumpManager::ProcessMinidump(const base::FilePath& minidump_path,
if (!r) {
LOG(ERROR) << "Failed to move crash dump from " << minidump_path.value()
<< " to " << dest_path.value();
- base::Delete(minidump_path, false);
+ base::DeleteFile(minidump_path, false);
return;
}
LOG(INFO) << "Crash minidump successfully generated: " <<
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index 9cc661b..1471b27 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -267,7 +267,7 @@ void ReadLastShutdownFile(ShutdownType type,
int64 shutdown_ms = 0;
if (file_util::ReadFileToString(shutdown_ms_file, &shutdown_ms_str))
base::StringToInt64(shutdown_ms_str, &shutdown_ms);
- base::Delete(shutdown_ms_file, false);
+ base::DeleteFile(shutdown_ms_file, false);
if (type == NOT_VALID || shutdown_ms == 0 || num_procs == 0)
return;
diff --git a/chrome/browser/chrome_to_mobile_service.cc b/chrome/browser/chrome_to_mobile_service.cc
index 9a069ca..8aafd71 100644
--- a/chrome/browser/chrome_to_mobile_service.cc
+++ b/chrome/browser/chrome_to_mobile_service.cc
@@ -205,7 +205,7 @@ void ReadSnapshotFile(scoped_ptr<ChromeToMobileService::JobData> data,
// Call this as a BlockingPoolSequencedTask [after posting SubmitSnapshotFile].
void DeleteSnapshotFile(const base::FilePath& snapshot) {
DCHECK(!content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
- bool success = base::Delete(snapshot, false);
+ bool success = base::DeleteFile(snapshot, false);
DCHECK(success);
}
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_data.cc b/chrome/browser/chromeos/app_mode/kiosk_app_data.cc
index 7e998cd..524c98b 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_data.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_data.cc
@@ -277,7 +277,7 @@ void KioskAppData::ClearCache() {
if (!icon_path_.empty()) {
BrowserThread::PostBlockingPoolTask(
FROM_HERE,
- base::Bind(base::IgnoreResult(&base::Delete), icon_path_, false));
+ base::Bind(base::IgnoreResult(&base::DeleteFile), icon_path_, false));
}
}
diff --git a/chrome/browser/chromeos/contacts/contact_database.cc b/chrome/browser/chromeos/contacts/contact_database.cc
index cfff9b2..6abac15 100644
--- a/chrome/browser/chromeos/contacts/contact_database.cc
+++ b/chrome/browser/chromeos/contacts/contact_database.cc
@@ -200,7 +200,7 @@ void ContactDatabase::InitFromTaskRunner(const base::FilePath& database_dir,
// Delete the existing database and try again (just once, though).
if (status.IsCorruption() && delete_and_retry_on_corruption) {
LOG(WARNING) << "Deleting possibly-corrupt database";
- base::Delete(database_dir, true);
+ base::DeleteFile(database_dir, true);
delete_and_retry_on_corruption = false;
histogram_result = HISTOGRAM_INIT_RESULT_DELETED_CORRUPTED;
} else {
diff --git a/chrome/browser/chromeos/drive/file_cache.cc b/chrome/browser/chromeos/drive/file_cache.cc
index a99f565..32455e9 100644
--- a/chrome/browser/chromeos/drive/file_cache.cc
+++ b/chrome/browser/chromeos/drive/file_cache.cc
@@ -230,7 +230,7 @@ bool FileCache::FreeDiskSpaceIfNeededFor(int64 num_bytes) {
current = enumerator.Next()) {
std::string resource_id = GetResourceIdFromPath(current);
if (!storage_->GetCacheEntry(resource_id, &entry))
- base::Delete(current, false /* recursive */);
+ base::DeleteFile(current, false /* recursive */);
}
// Check the disk space again.
@@ -493,7 +493,7 @@ FileError FileCache::Remove(const std::string& resource_id) {
// Delete the file.
base::FilePath path = GetCacheFilePath(resource_id);
- if (!base::Delete(path, false /* recursive */))
+ if (!base::DeleteFile(path, false /* recursive */))
return FILE_ERROR_FAILED;
// Now that all file operations have completed, remove from metadata.
@@ -669,7 +669,7 @@ bool FileCache::ClearAll() {
base::FileEnumerator::FILES);
for (base::FilePath file = enumerator.Next(); !file.empty();
file = enumerator.Next())
- base::Delete(file, false /* recursive */);
+ base::DeleteFile(file, false /* recursive */);
return true;
}
@@ -710,7 +710,7 @@ bool FileCache::ImportOldDB(const base::FilePath& old_db_path) {
}
// Delete old DB.
- base::Delete(old_db_path, true /* recursive */ );
+ base::DeleteFile(old_db_path, true /* recursive */ );
return imported;
}
@@ -723,7 +723,7 @@ void FileCache::RenameCacheFilesToNewFormat() {
"*.*.*");
for (base::FilePath current = enumerator.Next(); !current.empty();
current = enumerator.Next())
- base::Delete(current, false /* recursive */);
+ base::DeleteFile(current, false /* recursive */);
}
// Rename files.
diff --git a/chrome/browser/chromeos/drive/file_cache_metadata.cc b/chrome/browser/chromeos/drive/file_cache_metadata.cc
index 7d6c662..850c0cf 100644
--- a/chrome/browser/chromeos/drive/file_cache_metadata.cc
+++ b/chrome/browser/chromeos/drive/file_cache_metadata.cc
@@ -110,7 +110,7 @@ FileCacheMetadata::InitializeResult FileCacheMetadata::Initialize(
LOG(WARNING) << "Cache db failed to open: " << db_status.ToString();
uma_status = db_status.IsCorruption() ?
DB_OPEN_FAILURE_CORRUPTION : DB_OPEN_FAILURE_OTHER;
- const bool deleted = base::Delete(db_path, true);
+ const bool deleted = base::DeleteFile(db_path, true);
DCHECK(deleted);
db_status = leveldb::DB::Open(options, db_path.value(), &level_db);
if (!db_status.ok()) {
diff --git a/chrome/browser/chromeos/drive/file_cache_unittest.cc b/chrome/browser/chromeos/drive/file_cache_unittest.cc
index 4b68555..6f70aca 100644
--- a/chrome/browser/chromeos/drive/file_cache_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_cache_unittest.cc
@@ -860,7 +860,7 @@ TEST_F(FileCacheTest, ScanCacheFile) {
// Remove the existing DB.
const base::FilePath metadata_directory =
temp_dir_.path().Append(util::kMetadataDirectory);
- ASSERT_TRUE(base::Delete(metadata_directory, true /* recursive */));
+ ASSERT_TRUE(base::DeleteFile(metadata_directory, true /* recursive */));
// Put an empty file with the same name as old DB.
// This file cannot be opened by ImportOldDB() and will be dismissed.
diff --git a/chrome/browser/chromeos/drive/file_system/download_operation.cc b/chrome/browser/chromeos/drive/file_system/download_operation.cc
index 754bb46..a391986 100644
--- a/chrome/browser/chromeos/drive/file_system/download_operation.cc
+++ b/chrome/browser/chromeos/drive/file_system/download_operation.cc
@@ -182,7 +182,7 @@ FileError UpdateLocalStateForDownloadFile(
FileError error = util::GDataToFileError(gdata_error);
if (error != FILE_ERROR_OK) {
- base::Delete(downloaded_file_path, false /* recursive */);
+ base::DeleteFile(downloaded_file_path, false /* recursive */);
return error;
}
@@ -190,7 +190,7 @@ FileError UpdateLocalStateForDownloadFile(
error = cache->Store(resource_id, md5, downloaded_file_path,
internal::FileCache::FILE_OPERATION_MOVE);
if (error != FILE_ERROR_OK) {
- base::Delete(downloaded_file_path, false /* recursive */);
+ base::DeleteFile(downloaded_file_path, false /* recursive */);
return error;
}
diff --git a/chrome/browser/chromeos/drive/file_system_util.cc b/chrome/browser/chromeos/drive/file_system_util.cc
index 1907bab..ab1862d 100644
--- a/chrome/browser/chromeos/drive/file_system_util.cc
+++ b/chrome/browser/chromeos/drive/file_system_util.cc
@@ -323,7 +323,7 @@ void MigrateCacheFilesFromOldDirectories(
// Move all files inside "persistent" to "files".
MoveAllFilesFromDirectory(persistent_directory, cache_file_directory);
- base::Delete(persistent_directory, true /* recursive */);
+ base::DeleteFile(persistent_directory, true /* recursive */);
// Move all files inside "tmp" to "files".
MoveAllFilesFromDirectory(tmp_directory, cache_file_directory);
diff --git a/chrome/browser/chromeos/drive/resource_metadata_storage.cc b/chrome/browser/chromeos/drive/resource_metadata_storage.cc
index 8dc0fbc..374e4c1 100644
--- a/chrome/browser/chromeos/drive/resource_metadata_storage.cc
+++ b/chrome/browser/chromeos/drive/resource_metadata_storage.cc
@@ -217,7 +217,7 @@ bool ResourceMetadataStorage::Initialize() {
// Remove unused child map DB.
const base::FilePath child_map_path = directory_path_.Append(kChildMapDBName);
- base::Delete(child_map_path, true /* recursive */);
+ base::DeleteFile(child_map_path, true /* recursive */);
resource_map_.reset();
@@ -267,7 +267,7 @@ bool ResourceMetadataStorage::Initialize() {
// Clean up the destination.
const bool kRecursive = true;
- base::Delete(resource_map_path, kRecursive);
+ base::DeleteFile(resource_map_path, kRecursive);
// Create DB.
options.create_if_missing = true;
diff --git a/chrome/browser/chromeos/imageburner/burn_manager.cc b/chrome/browser/chromeos/imageburner/burn_manager.cc
index 9d3ab26..51957c6 100644
--- a/chrome/browser/chromeos/imageburner/burn_manager.cc
+++ b/chrome/browser/chromeos/imageburner/burn_manager.cc
@@ -238,7 +238,7 @@ BurnManager::BurnManager(
BurnManager::~BurnManager() {
if (image_dir_created_) {
- base::Delete(image_dir_, true);
+ base::DeleteFile(image_dir_, true);
}
if (NetworkHandler::IsInitialized()) {
NetworkHandler::Get()->network_state_handler()->RemoveObserver(
diff --git a/chrome/browser/chromeos/login/user_image_manager_impl.cc b/chrome/browser/chromeos/login/user_image_manager_impl.cc
index eb7859c..f66f0f0 100644
--- a/chrome/browser/chromeos/login/user_image_manager_impl.cc
+++ b/chrome/browser/chromeos/login/user_image_manager_impl.cc
@@ -145,7 +145,7 @@ void DeleteImageFile(const std::string& image_path) {
BrowserThread::PostTask(
BrowserThread::FILE,
FROM_HERE,
- base::Bind(base::IgnoreResult(&base::Delete),
+ base::Bind(base::IgnoreResult(&base::DeleteFile),
fp, /* recursive= */ false));
}
diff --git a/chrome/browser/chromeos/login/wallpaper_manager.cc b/chrome/browser/chromeos/login/wallpaper_manager.cc
index d5a7bbf..8957ecc 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager.cc
+++ b/chrome/browser/chromeos/login/wallpaper_manager.cc
@@ -394,7 +394,7 @@ void WallpaperManager::ResizeAndSaveWallpaper(const UserImage& wallpaper,
if (layout == ash::WALLPAPER_LAYOUT_CENTER) {
// TODO(bshe): Generates cropped custom wallpaper for CENTER layout.
if (base::PathExists(path))
- base::Delete(path, false);
+ base::DeleteFile(path, false);
return;
}
scoped_refptr<base::RefCountedBytes> data;
@@ -676,7 +676,7 @@ void WallpaperManager::DeleteAllExcept(const base::FilePath& path) {
for (base::FilePath current = files.Next(); !current.empty();
current = files.Next()) {
if (current != path)
- base::Delete(current, false);
+ base::DeleteFile(current, false);
}
}
}
@@ -688,8 +688,8 @@ void WallpaperManager::DeleteWallpaperInList(
base::FilePath path = *it;
// Some users may still have legacy wallpapers with png extension. We need
// to delete these wallpapers too.
- if (!base::Delete(path, true) &&
- !base::Delete(path.AddExtension(".png"), false)) {
+ if (!base::DeleteFile(path, true) &&
+ !base::DeleteFile(path.AddExtension(".png"), false)) {
LOG(ERROR) << "Failed to remove user wallpaper at " << path.value();
}
}
diff --git a/chrome/browser/chromeos/policy/app_pack_updater.cc b/chrome/browser/chromeos/policy/app_pack_updater.cc
index feb5950..ad89025 100644
--- a/chrome/browser/chromeos/policy/app_pack_updater.cc
+++ b/chrome/browser/chromeos/policy/app_pack_updater.cc
@@ -261,7 +261,7 @@ void AppPackUpdater::BlockingCheckCacheInternal(
if (info.IsDirectory() || file_util::IsLink(info.GetName())) {
LOG(ERROR) << "Erasing bad file in AppPack directory: " << basename;
- base::Delete(path, true /* recursive */);
+ base::DeleteFile(path, true /* recursive */);
continue;
}
@@ -294,7 +294,7 @@ void AppPackUpdater::BlockingCheckCacheInternal(
if (id.empty() || version.empty()) {
LOG(ERROR) << "Invalid file in AppPack cache, erasing: " << basename;
- base::Delete(path, true /* recursive */);
+ base::DeleteFile(path, true /* recursive */);
continue;
}
@@ -313,10 +313,10 @@ void AppPackUpdater::BlockingCheckCacheInternal(
DCHECK(vEntry.IsValid());
DCHECK(vCurrent.IsValid());
if (vEntry.CompareTo(vCurrent) < 0) {
- base::Delete(base::FilePath(entry.path), true /* recursive */);
+ base::DeleteFile(base::FilePath(entry.path), true /* recursive */);
entry.path = path.value();
} else {
- base::Delete(path, true /* recursive */);
+ base::DeleteFile(path, true /* recursive */);
}
continue;
}
@@ -470,7 +470,7 @@ void AppPackUpdater::BlockingInstallCacheEntry(
if (!version_validator.IsValid()) {
LOG(ERROR) << "AppPack downloaded extension " << id << " but got bad "
<< "version: " << version;
- base::Delete(path, true /* recursive */);
+ base::DeleteFile(path, true /* recursive */);
return;
}
@@ -481,7 +481,7 @@ void AppPackUpdater::BlockingInstallCacheEntry(
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 */);
+ base::DeleteFile(cached_crx_path, true /* recursive */);
}
if (!base::DirectoryExists(cache_dir)) {
@@ -489,7 +489,7 @@ void AppPackUpdater::BlockingInstallCacheEntry(
<< cache_dir.value();
if (!file_util::CreateDirectory(cache_dir)) {
LOG(ERROR) << "Failed to create the AppPack cache dir!";
- base::Delete(path, true /* recursive */);
+ base::DeleteFile(path, true /* recursive */);
return;
}
}
@@ -497,7 +497,7 @@ void AppPackUpdater::BlockingInstallCacheEntry(
if (!base::Move(path, cached_crx_path)) {
LOG(ERROR) << "Failed to move AppPack crx from " << path.value()
<< " to " << cached_crx_path.value();
- base::Delete(path, true /* recursive */);
+ base::DeleteFile(path, true /* recursive */);
return;
}
@@ -539,7 +539,7 @@ void AppPackUpdater::OnDamagedFileDetected(const base::FilePath& path) {
// The file will be downloaded again on the next restart.
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
- base::Bind(base::IgnoreResult(base::Delete), path, true));
+ base::Bind(base::IgnoreResult(base::DeleteFile), path, true));
// Don't try to DownloadMissingExtensions() from here,
// since it can cause a fail/retry loop.
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 651de62..c6cb989 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 (base::PathExists(dir) && !base::Delete(dir, true))
+ if (base::PathExists(dir) && !base::DeleteFile(dir, true))
LOG(ERROR) << "Failed to remove cache dir " << dir.value();
}
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 96f19d6..01bfd31 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
@@ -239,7 +239,7 @@ class UserCloudPolicyStoreChromeOSTest : public testing::Test {
TEST_F(UserCloudPolicyStoreChromeOSTest, InitialStore) {
// Start without any public key to trigger the initial key checks.
- ASSERT_TRUE(base::Delete(user_policy_key_file(), false));
+ ASSERT_TRUE(base::DeleteFile(user_policy_key_file(), false));
// Make the policy blob contain a new public key.
policy_.set_new_signing_key(PolicyBuilder::CreateTestNewSigningKey());
policy_.Build();
@@ -383,7 +383,7 @@ TEST_F(UserCloudPolicyStoreChromeOSTest, LoadValidationError) {
TEST_F(UserCloudPolicyStoreChromeOSTest, LoadNoKey) {
// The loaded policy can't be verified without the public key.
- ASSERT_TRUE(base::Delete(user_policy_key_file(), false));
+ ASSERT_TRUE(base::DeleteFile(user_policy_key_file(), false));
ExpectError(CloudPolicyStore::STATUS_VALIDATION_ERROR);
ASSERT_NO_FATAL_FAILURE(PerformPolicyLoad(policy_.GetBlob()));
VerifyStoreHasValidationError();
@@ -480,7 +480,7 @@ TEST_F(UserCloudPolicyStoreChromeOSTest, MigrationNoPolicy) {
TEST_F(UserCloudPolicyStoreChromeOSTest, MigrationAndStoreNew) {
// Start without an existing public key.
- ASSERT_TRUE(base::Delete(user_policy_key_file(), false));
+ ASSERT_TRUE(base::DeleteFile(user_policy_key_file(), false));
std::string data;
em::CachedCloudPolicyResponse cached_policy;
diff --git a/chrome/browser/chromeos/system/syslogs_provider.cc b/chrome/browser/chromeos/system/syslogs_provider.cc
index 643d355..279d837 100644
--- a/chrome/browser/chromeos/system/syslogs_provider.cc
+++ b/chrome/browser/chromeos/system/syslogs_provider.cc
@@ -146,7 +146,7 @@ LogDictionaryType* GetSystemLogs(base::FilePath* zip_file_name,
&data);
// if we were using an internal temp file, the user does not need the
// logs to stay past the ReadFile call - delete the file
- base::Delete(temp_filename, false);
+ base::DeleteFile(temp_filename, false);
if (!read_success)
return NULL;
@@ -321,7 +321,7 @@ void SyslogsProviderImpl::ReadSyslogs(
// Load compressed logs.
zip_content = new std::string();
LoadCompressedLogs(zip_file, zip_content);
- base::Delete(zip_file, false);
+ base::DeleteFile(zip_file, false);
}
// Include dbus statistics summary
diff --git a/chrome/browser/chromeos/system/timezone_settings.cc b/chrome/browser/chromeos/system/timezone_settings.cc
index 83946f5..6ebffc9 100644
--- a/chrome/browser/chromeos/system/timezone_settings.cc
+++ b/chrome/browser/chromeos/system/timezone_settings.cc
@@ -208,7 +208,7 @@ void SetTimezoneIDFromString(const std::string& id) {
}
// Delete old symlink2 if it exists.
- base::Delete(timezone_symlink2, false);
+ base::DeleteFile(timezone_symlink2, false);
// Create new symlink2.
if (symlink(timezone_file.value().c_str(),
diff --git a/chrome/browser/component_updater/component_unpacker.cc b/chrome/browser/component_updater/component_unpacker.cc
index 1e3e558..744d90f 100644
--- a/chrome/browser/component_updater/component_unpacker.cc
+++ b/chrome/browser/component_updater/component_unpacker.cc
@@ -110,7 +110,7 @@ base::DictionaryValue* ReadManifest(const base::FilePath& unpack_path) {
// being inserted into the target directory by another process or thread.
bool MakeEmptyDirectory(const base::FilePath& path) {
if (base::PathExists(path)) {
- if (!base::Delete(path, true))
+ if (!base::DeleteFile(path, true))
return false;
}
if (!file_util::CreateDirectory(path))
@@ -186,7 +186,7 @@ ComponentUnpacker::ComponentUnpacker(const std::vector<uint8>& pk_hash,
patcher,
installer,
&extended_error_);
- base::Delete(unpack_diff_path, true);
+ base::DeleteFile(unpack_diff_path, true);
unpack_diff_path.clear();
error_ = result;
if (error_ != kNone) {
@@ -223,5 +223,5 @@ ComponentUnpacker::ComponentUnpacker(const std::vector<uint8>& pk_hash,
ComponentUnpacker::~ComponentUnpacker() {
if (!unpack_path_.empty())
- base::Delete(unpack_path_, true);
+ base::DeleteFile(unpack_path_, true);
}
diff --git a/chrome/browser/component_updater/component_updater_service.cc b/chrome/browser/component_updater/component_updater_service.cc
index ab9fb21..8b4b88b 100644
--- a/chrome/browser/component_updater/component_updater_service.cc
+++ b/chrome/browser/component_updater/component_updater_service.cc
@@ -929,7 +929,7 @@ void CrxUpdateService::Install(const CRXContext* context,
context->fingerprint,
component_patcher_.get(),
context->installer);
- if (!base::Delete(crx_path, false))
+ if (!base::DeleteFile(crx_path, false))
NOTREACHED() << crx_path.value();
// Why unretained? See comment at top of file.
BrowserThread::PostDelayedTask(
diff --git a/chrome/browser/component_updater/pepper_flash_component_installer.cc b/chrome/browser/component_updater/pepper_flash_component_installer.cc
index 5f5d369..0b1e359 100644
--- a/chrome/browser/component_updater/pepper_flash_component_installer.cc
+++ b/chrome/browser/component_updater/pepper_flash_component_installer.cc
@@ -385,7 +385,7 @@ void StartPepperFlashUpdateRegistration(ComponentUpdateService* cus) {
// Remove older versions of Pepper Flash.
for (std::vector<base::FilePath>::iterator iter = older_dirs.begin();
iter != older_dirs.end(); ++iter) {
- base::Delete(*iter, true);
+ base::DeleteFile(*iter, true);
}
}
#endif // defined(GOOGLE_CHROME_BUILD) && !defined(OS_LINUX)
diff --git a/chrome/browser/component_updater/pnacl/pnacl_component_installer.cc b/chrome/browser/component_updater/pnacl/pnacl_component_installer.cc
index e0ad6c3..0e47304 100644
--- a/chrome/browser/component_updater/pnacl/pnacl_component_installer.cc
+++ b/chrome/browser/component_updater/pnacl/pnacl_component_installer.cc
@@ -415,7 +415,7 @@ void StartPnaclUpdateRegistration(PnaclComponentInstaller* pci) {
// Remove older versions of PNaCl.
for (std::vector<base::FilePath>::iterator iter = older_dirs.begin();
iter != older_dirs.end(); ++iter) {
- base::Delete(*iter, true);
+ base::DeleteFile(*iter, true);
}
}
diff --git a/chrome/browser/component_updater/swiftshader_component_installer.cc b/chrome/browser/component_updater/swiftshader_component_installer.cc
index 12e8d8a..110c0e9 100644
--- a/chrome/browser/component_updater/swiftshader_component_installer.cc
+++ b/chrome/browser/component_updater/swiftshader_component_installer.cc
@@ -230,7 +230,7 @@ void RegisterSwiftShaderPath(ComponentUpdateService* cus) {
// Remove older versions of SwiftShader.
for (std::vector<base::FilePath>::iterator iter = older_dirs.begin();
iter != older_dirs.end(); ++iter) {
- base::Delete(*iter, true);
+ base::DeleteFile(*iter, true);
}
}
diff --git a/chrome/browser/component_updater/test/test_installer.cc b/chrome/browser/component_updater/test/test_installer.cc
index 3f9b0e0..28ff22d 100644
--- a/chrome/browser/component_updater/test/test_installer.cc
+++ b/chrome/browser/component_updater/test/test_installer.cc
@@ -19,7 +19,7 @@ void TestInstaller::OnUpdateError(int error) {
bool TestInstaller::Install(const base::DictionaryValue& manifest,
const base::FilePath& unpack_path) {
++install_count_;
- return base::Delete(unpack_path, true);
+ return base::DeleteFile(unpack_path, true);
}
bool TestInstaller::GetInstalledFile(const std::string& file,
@@ -52,7 +52,7 @@ VersionedTestInstaller::VersionedTestInstaller() {
}
VersionedTestInstaller::~VersionedTestInstaller() {
- base::Delete(install_directory_, true);
+ base::DeleteFile(install_directory_, true);
}
diff --git a/chrome/browser/component_updater/widevine_cdm_component_installer.cc b/chrome/browser/component_updater/widevine_cdm_component_installer.cc
index 96a2345..400b94f 100644
--- a/chrome/browser/component_updater/widevine_cdm_component_installer.cc
+++ b/chrome/browser/component_updater/widevine_cdm_component_installer.cc
@@ -302,7 +302,7 @@ void StartWidevineCdmUpdateRegistration(ComponentUpdateService* cus) {
BrowserThread::UI, FROM_HERE,
base::Bind(&RegisterWidevineCdmWithChrome, adapter_path, version));
} else {
- base::Delete(latest_dir, true);
+ base::DeleteFile(latest_dir, true);
version = base::Version(kNullVersion);
}
}
@@ -314,7 +314,7 @@ void StartWidevineCdmUpdateRegistration(ComponentUpdateService* cus) {
// Remove older versions of Widevine CDM.
for (std::vector<base::FilePath>::iterator iter = older_dirs.begin();
iter != older_dirs.end(); ++iter) {
- base::Delete(*iter, true);
+ base::DeleteFile(*iter, true);
}
}
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index f172947..6125d22 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -960,7 +960,7 @@ class DownloadTest : public InProcessBrowserTest {
base::FilePath destination_folder = GetDownloadDirectory(browser());
base::FilePath my_downloaded_file = item->GetTargetFilePath();
EXPECT_TRUE(base::PathExists(my_downloaded_file));
- EXPECT_TRUE(base::Delete(my_downloaded_file, false));
+ EXPECT_TRUE(base::DeleteFile(my_downloaded_file, false));
EXPECT_EQ(download_info.should_redirect_to_documents ?
std::string::npos :
diff --git a/chrome/browser/extensions/activity_log/activity_database_unittest.cc b/chrome/browser/extensions/activity_log/activity_database_unittest.cc
index edd14dd..35d9d5a 100644
--- a/chrome/browser/extensions/activity_log/activity_database_unittest.cc
+++ b/chrome/browser/extensions/activity_log/activity_database_unittest.cc
@@ -106,7 +106,7 @@ TEST_F(ActivityDatabaseTest, Init) {
base::FilePath db_file;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
db_file = temp_dir.path().AppendASCII("ActivityInit.db");
- base::Delete(db_file, false);
+ base::DeleteFile(db_file, false);
ActivityDatabase* activity_db = OpenDatabase(db_file);
activity_db->Close();
@@ -125,7 +125,7 @@ TEST_F(ActivityDatabaseTest, RecordAPIAction) {
base::FilePath db_file;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
db_file = temp_dir.path().AppendASCII("ActivityRecord.db");
- base::Delete(db_file, false);
+ base::DeleteFile(db_file, false);
ActivityDatabase* activity_db = OpenDatabase(db_file);
activity_db->SetBatchModeForTesting(false);
@@ -159,7 +159,7 @@ TEST_F(ActivityDatabaseTest, RecordDOMAction) {
base::FilePath db_file;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
db_file = temp_dir.path().AppendASCII("ActivityRecord.db");
- base::Delete(db_file, false);
+ base::DeleteFile(db_file, false);
ActivityDatabase* activity_db = OpenDatabase(db_file);
activity_db->SetBatchModeForTesting(false);
@@ -202,7 +202,7 @@ TEST_F(ActivityDatabaseTest, RecordBlockedAction) {
base::FilePath db_file;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
db_file = temp_dir.path().AppendASCII("ActivityRecord.db");
- base::Delete(db_file, false);
+ base::DeleteFile(db_file, false);
ActivityDatabase* activity_db = OpenDatabase(db_file);
scoped_refptr<BlockedAction> action = new BlockedAction(
@@ -236,7 +236,7 @@ TEST_F(ActivityDatabaseTest, GetTodaysActions) {
base::FilePath db_file;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
db_file = temp_dir.path().AppendASCII("ActivityRecord.db");
- base::Delete(db_file, false);
+ base::DeleteFile(db_file, false);
// Use a mock clock to ensure that events are not recorded on the wrong day
// when the test is run close to local midnight.
@@ -294,7 +294,7 @@ TEST_F(ActivityDatabaseTest, GetOlderActions) {
base::FilePath db_file;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
db_file = temp_dir.path().AppendASCII("ActivityRecord.db");
- base::Delete(db_file, false);
+ base::DeleteFile(db_file, false);
// Use a mock clock to ensure that events are not recorded on the wrong day
// when the test is run close to local midnight.
@@ -362,7 +362,7 @@ TEST_F(ActivityDatabaseTest, BatchModeOff) {
base::FilePath db_file;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
db_file = temp_dir.path().AppendASCII("ActivityRecord.db");
- base::Delete(db_file, false);
+ base::DeleteFile(db_file, false);
// Use a mock clock to ensure that events are not recorded on the wrong day
// when the test is run close to local midnight.
@@ -394,7 +394,7 @@ TEST_F(ActivityDatabaseTest, BatchModeOn) {
base::FilePath db_file;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
db_file = temp_dir.path().AppendASCII("ActivityRecord.db");
- base::Delete(db_file, false);
+ base::DeleteFile(db_file, false);
// Use a mock clock to set the time, and a special timer to control the
// timing and skip ahead in time.
@@ -436,7 +436,7 @@ TEST_F(ActivityDatabaseTest, InitFailure) {
base::FilePath db_file;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
db_file = temp_dir.path().AppendASCII("ActivityRecord.db");
- base::Delete(db_file, false);
+ base::DeleteFile(db_file, false);
ActivityDatabase* activity_db =
new ActivityDatabase(new ActivityDatabaseTestPolicy());
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
index 81c4fb6..6da6d0e 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -920,7 +920,7 @@ bool DeveloperPrivateExportSyncfsFolderToLocalfsFunction::RunImpl() {
void DeveloperPrivateExportSyncfsFolderToLocalfsFunction::
ClearPrexistingDirectoryContent(const base::FilePath& project_path) {
- if (!base::Delete(project_path, true/*recursive*/)) {
+ if (!base::DeleteFile(project_path, true/*recursive*/)) {
SetError("Error in copying files from sync filesystem.");
content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
base::Bind(&DeveloperPrivateExportSyncfsFolderToLocalfsFunction::
diff --git a/chrome/browser/extensions/api/record/record_api_test.cc b/chrome/browser/extensions/api/record/record_api_test.cc
index 3fd41d9..40813a2 100644
--- a/chrome/browser/extensions/api/record/record_api_test.cc
+++ b/chrome/browser/extensions/api/record/record_api_test.cc
@@ -188,7 +188,7 @@ class RecordApiTest : public InProcessBrowserTest {
InProcessBrowserTest::CleanUpOnMainThread();
for (std::vector<base::FilePath>::const_iterator it = temp_files_.begin();
it != temp_files_.end(); ++it) {
- if (!base::Delete(*it, false))
+ if (!base::DeleteFile(*it, false))
NOTREACHED();
}
}
diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
index 3e3fe78..b4f80d2 100644
--- a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
@@ -191,7 +191,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, InstallAccepted) {
base::ScopedTempDir temp_dir;
EXPECT_TRUE(temp_dir.CreateUniqueTempDir());
base::FilePath missing_directory = temp_dir.Take();
- EXPECT_TRUE(base::Delete(missing_directory, true));
+ EXPECT_TRUE(base::DeleteFile(missing_directory, true));
WebstoreInstaller::SetDownloadDirectoryForTests(&missing_directory);
// Now run the install test, which should succeed.
@@ -199,7 +199,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, InstallAccepted) {
// Cleanup.
if (base::DirectoryExists(missing_directory))
- EXPECT_TRUE(base::Delete(missing_directory, true));
+ EXPECT_TRUE(base::DeleteFile(missing_directory, true));
}
// Tests passing a localized name.
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 4f905c6..ceb7264 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -240,7 +240,7 @@ const Extension* ExtensionBrowserTest::LoadExtensionAsComponent(
base::FilePath ExtensionBrowserTest::PackExtension(
const base::FilePath& dir_path) {
base::FilePath crx_path = temp_dir_.path().AppendASCII("temp.crx");
- if (!base::Delete(crx_path, false)) {
+ if (!base::DeleteFile(crx_path, false)) {
ADD_FAILURE() << "Failed to delete crx: " << crx_path.value();
return base::FilePath();
}
@@ -253,7 +253,7 @@ base::FilePath ExtensionBrowserTest::PackExtension(
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)) {
+ if (!base::DeleteFile(pem_path_out, false)) {
ADD_FAILURE() << "Failed to delete pem: " << pem_path_out.value();
return base::FilePath();
}
diff --git a/chrome/browser/extensions/extension_creator.cc b/chrome/browser/extensions/extension_creator.cc
index 0784fee..e344338 100644
--- a/chrome/browser/extensions/extension_creator.cc
+++ b/chrome/browser/extensions/extension_creator.cc
@@ -237,7 +237,7 @@ bool ExtensionCreator::WriteCRX(const base::FilePath& zip_path,
const std::vector<uint8>& signature,
const base::FilePath& crx_path) {
if (base::PathExists(crx_path))
- base::Delete(crx_path, false);
+ base::DeleteFile(crx_path, false);
ScopedStdioHandle crx_handle(file_util::OpenFile(crx_path, "wb"));
if (!crx_handle.get()) {
error_message_ = l10n_util::GetStringUTF8(IDS_EXTENSION_SHARING_VIOLATION);
@@ -322,7 +322,7 @@ bool ExtensionCreator::Run(const base::FilePath& extension_dir,
result = true;
}
- base::Delete(zip_path, false);
+ base::DeleteFile(zip_path, false);
return result;
}
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index 5121e67e..8811e48 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -518,13 +518,13 @@ void ExtensionServiceTestBase::InitializeInstalledExtensionService(
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
base::FilePath path = temp_dir_.path();
path = path.Append(FILE_PATH_LITERAL("TestingExtensionsPath"));
- base::Delete(path, true);
+ base::DeleteFile(path, true);
file_util::CreateDirectory(path);
base::FilePath temp_prefs = path.Append(FILE_PATH_LITERAL("Preferences"));
base::CopyFile(prefs_file, temp_prefs);
extensions_install_dir_ = path.Append(FILE_PATH_LITERAL("Extensions"));
- base::Delete(extensions_install_dir_, true);
+ base::DeleteFile(extensions_install_dir_, true);
base::CopyDirectory(source_install_dir, extensions_install_dir_, true);
ExtensionServiceInitParams params;
@@ -554,12 +554,12 @@ void ExtensionServiceTestBase::InitializeExtensionServiceHelper(
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
base::FilePath path = temp_dir_.path();
path = path.Append(FILE_PATH_LITERAL("TestingExtensionsPath"));
- base::Delete(path, true);
+ base::DeleteFile(path, true);
file_util::CreateDirectory(path);
base::FilePath prefs_filename =
path.Append(FILE_PATH_LITERAL("TestPreferences"));
extensions_install_dir_ = path.Append(FILE_PATH_LITERAL("Extensions"));
- base::Delete(extensions_install_dir_, true);
+ base::DeleteFile(extensions_install_dir_, true);
file_util::CreateDirectory(extensions_install_dir_);
ExtensionServiceInitParams params;
@@ -678,7 +678,7 @@ class ExtensionServiceTest
ASSERT_TRUE(base::PathExists(pem_path));
}
- ASSERT_TRUE(base::Delete(crx_path, false));
+ ASSERT_TRUE(base::DeleteFile(crx_path, false));
scoped_ptr<ExtensionCreator> creator(new ExtensionCreator());
ASSERT_TRUE(creator->Run(dir_path,
@@ -2091,7 +2091,7 @@ TEST_F(ExtensionServiceTest, PackExtension) {
// Repeat the run with the pem file gone, and no special flags
// Should refuse to overwrite the existing crx.
- base::Delete(privkey_path, false);
+ base::DeleteFile(privkey_path, false);
ASSERT_FALSE(creator->Run(input_directory, crx_path, base::FilePath(),
privkey_path, ExtensionCreator::kNoRunFlags));
@@ -2228,7 +2228,7 @@ TEST_F(ExtensionServiceTest, PackExtensionContainingKeyFails) {
ASSERT_TRUE(base::PathExists(crx_path));
ASSERT_TRUE(base::PathExists(privkey_path));
- base::Delete(crx_path, false);
+ base::DeleteFile(crx_path, false);
// Move the pem file into the extension.
base::Move(privkey_path,
input_directory.AppendASCII("privkey.pem"));
@@ -2331,7 +2331,7 @@ TEST_F(ExtensionServiceTest, LoadLocalizedTheme) {
// 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(base::PathExists(theme_file));
- ASSERT_TRUE(base::Delete(theme_file, false)); // Not recursive.
+ ASSERT_TRUE(base::DeleteFile(theme_file, false)); // Not recursive.
}
// Tests that we can change the ID of an unpacked extension by adding a key
diff --git a/chrome/browser/extensions/extension_startup_browsertest.cc b/chrome/browser/extensions/extension_startup_browsertest.cc
index 38c4184..300f023 100644
--- a/chrome/browser/extensions/extension_startup_browsertest.cc
+++ b/chrome/browser/extensions/extension_startup_browsertest.cc
@@ -78,11 +78,11 @@ class ExtensionStartupTestBase : public InProcessBrowserTest {
}
virtual void TearDown() {
- EXPECT_TRUE(base::Delete(preferences_file_, false));
+ EXPECT_TRUE(base::DeleteFile(preferences_file_, false));
// TODO(phajdan.jr): Check return values of the functions below, carefully.
- base::Delete(user_scripts_dir_, true);
- base::Delete(extensions_dir_, true);
+ base::DeleteFile(user_scripts_dir_, true);
+ base::DeleteFile(extensions_dir_, true);
InProcessBrowserTest::TearDown();
}
diff --git a/chrome/browser/extensions/sandboxed_unpacker.cc b/chrome/browser/extensions/sandboxed_unpacker.cc
index 8b41583b..cb40deb 100644
--- a/chrome/browser/extensions/sandboxed_unpacker.cc
+++ b/chrome/browser/extensions/sandboxed_unpacker.cc
@@ -145,7 +145,7 @@ bool VerifyJunctionFreeLocation(base::FilePath* temp_dir) {
*temp_dir = normalized_temp_file.DirName();
}
// Clean up the temp file.
- base::Delete(temp_file, false);
+ base::DeleteFile(temp_file, false);
return normalized;
}
@@ -679,7 +679,7 @@ bool SandboxedUnpacker::RewriteImageFiles(SkBitmap* install_icon) {
ASCIIToUTF16("INVALID_PATH_FOR_BROWSER_IMAGE")));
return false;
}
- if (!base::Delete(extension_root_.Append(path), false)) {
+ if (!base::DeleteFile(extension_root_.Append(path), false)) {
// Error removing old image file.
ReportFailure(
ERROR_REMOVING_OLD_IMAGE_FILE,
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc
index 2f6e0b3..df29d21 100644
--- a/chrome/browser/first_run/first_run.cc
+++ b/chrome/browser/first_run/first_run.cc
@@ -502,7 +502,7 @@ bool RemoveSentinel() {
base::FilePath first_run_sentinel;
if (!internal::GetFirstRunSentinelFilePath(&first_run_sentinel))
return false;
- return base::Delete(first_run_sentinel, false);
+ return base::DeleteFile(first_run_sentinel, false);
}
bool SetShowFirstRunBubblePref(FirstRunBubbleOptions show_bubble_option) {
diff --git a/chrome/browser/first_run/first_run_browsertest.cc b/chrome/browser/first_run/first_run_browsertest.cc
index 437f691..b6fd6fd 100644
--- a/chrome/browser/first_run/first_run_browsertest.cc
+++ b/chrome/browser/first_run/first_run_browsertest.cc
@@ -93,7 +93,7 @@ class FirstRunMasterPrefsBrowserTestBase : public InProcessBrowserTest {
}
virtual void TearDown() OVERRIDE {
- EXPECT_TRUE(base::Delete(prefs_file_, false));
+ EXPECT_TRUE(base::DeleteFile(prefs_file_, false));
InProcessBrowserTest::TearDown();
}
diff --git a/chrome/browser/google/google_update_settings_posix.cc b/chrome/browser/google/google_update_settings_posix.cc
index 4da917a..8942024 100644
--- a/chrome/browser/google/google_update_settings_posix.cc
+++ b/chrome/browser/google/google_update_settings_posix.cc
@@ -51,7 +51,7 @@ bool GoogleUpdateSettings::SetCollectStatsConsent(bool consented) {
}
} else {
google_update::posix_guid().clear();
- return base::Delete(consent_file, false);
+ return base::DeleteFile(consent_file, false);
}
return true;
}
diff --git a/chrome/browser/google_apis/base_requests_server_unittest.cc b/chrome/browser/google_apis/base_requests_server_unittest.cc
index 63af4eb..8b0f815 100644
--- a/chrome/browser/google_apis/base_requests_server_unittest.cc
+++ b/chrome/browser/google_apis/base_requests_server_unittest.cc
@@ -94,7 +94,7 @@ TEST_F(BaseRequestsServerTest, DownloadFileRequest_ValidFile) {
std::string contents;
file_util::ReadFileToString(temp_file, &contents);
- base::Delete(temp_file, false);
+ base::DeleteFile(temp_file, false);
EXPECT_EQ(HTTP_SUCCESS, result_code);
EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
diff --git a/chrome/browser/google_apis/drive_api_requests_unittest.cc b/chrome/browser/google_apis/drive_api_requests_unittest.cc
index 63d3824..e73b848 100644
--- a/chrome/browser/google_apis/drive_api_requests_unittest.cc
+++ b/chrome/browser/google_apis/drive_api_requests_unittest.cc
@@ -1384,7 +1384,7 @@ TEST_F(DriveApiRequestsTest, DownloadFileRequest) {
std::string contents;
file_util::ReadFileToString(temp_file, &contents);
- base::Delete(temp_file, false);
+ base::DeleteFile(temp_file, false);
EXPECT_EQ(HTTP_SUCCESS, result_code);
EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
diff --git a/chrome/browser/google_apis/gdata_wapi_requests_unittest.cc b/chrome/browser/google_apis/gdata_wapi_requests_unittest.cc
index 3981a26..6373d24 100644
--- a/chrome/browser/google_apis/gdata_wapi_requests_unittest.cc
+++ b/chrome/browser/google_apis/gdata_wapi_requests_unittest.cc
@@ -1587,7 +1587,7 @@ TEST_F(GDataWapiRequestsTest, DownloadFileRequest) {
std::string contents;
file_util::ReadFileToString(temp_file, &contents);
- base::Delete(temp_file, false);
+ base::DeleteFile(temp_file, false);
EXPECT_EQ(HTTP_SUCCESS, result_code);
EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc
index f97a882..7bd2328 100644
--- a/chrome/browser/history/history_backend_unittest.cc
+++ b/chrome/browser/history/history_backend_unittest.cc
@@ -391,7 +391,7 @@ class HistoryBackendTest : public testing::Test {
backend_->Closing();
backend_ = NULL;
mem_backend_.reset();
- base::Delete(test_dir_, true);
+ base::DeleteFile(test_dir_, true);
base::RunLoop().RunUntilIdle();
}
@@ -1275,7 +1275,7 @@ TEST_F(HistoryBackendTest, MigrationVisitSource) {
// Copy history database file to current directory so that it will be deleted
// in Teardown.
base::FilePath new_history_path(getTestDir());
- base::Delete(new_history_path, true);
+ base::DeleteFile(new_history_path, true);
file_util::CreateDirectory(new_history_path);
base::FilePath new_history_file =
new_history_path.Append(chrome::kHistoryFilename);
@@ -2514,7 +2514,7 @@ TEST_F(HistoryBackendTest, MigrationVisitDuration) {
// Copy history database file to current directory so that it will be deleted
// in Teardown.
base::FilePath new_history_path(getTestDir());
- base::Delete(new_history_path, true);
+ base::DeleteFile(new_history_path, true);
file_util::CreateDirectory(new_history_path);
base::FilePath new_history_file =
new_history_path.Append(chrome::kHistoryFilename);
diff --git a/chrome/browser/history/in_memory_url_index.cc b/chrome/browser/history/in_memory_url_index.cc
index 10cac6fb..0f6ee80 100644
--- a/chrome/browser/history/in_memory_url_index.cc
+++ b/chrome/browser/history/in_memory_url_index.cc
@@ -31,7 +31,7 @@ namespace history {
// there is no private data to save. Runs on the FILE thread.
void DeleteCacheFile(const base::FilePath& path) {
DCHECK(!content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
- base::Delete(path, false);
+ base::DeleteFile(path, false);
}
// Initializes a whitelist of URL schemes.
diff --git a/chrome/browser/history/text_database_manager_unittest.cc b/chrome/browser/history/text_database_manager_unittest.cc
index fa5a1f3..51a632e 100644
--- a/chrome/browser/history/text_database_manager_unittest.cc
+++ b/chrome/browser/history/text_database_manager_unittest.cc
@@ -161,7 +161,7 @@ class TextDatabaseManagerTest : public testing::Test {
}
virtual void TearDown() {
- base::Delete(dir_, true);
+ base::DeleteFile(dir_, true);
}
base::MessageLoop message_loop_;
diff --git a/chrome/browser/importer/firefox_importer_browsertest.cc b/chrome/browser/importer/firefox_importer_browsertest.cc
index 688c2c2..70aa30a4 100644
--- a/chrome/browser/importer/firefox_importer_browsertest.cc
+++ b/chrome/browser/importer/firefox_importer_browsertest.cc
@@ -219,7 +219,7 @@ class FirefoxProfileImporterBrowserTest : public InProcessBrowserTest {
// Creates a new profile in a new subdirectory in the temp directory.
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
base::FilePath test_path = temp_dir_.path().AppendASCII("ImporterTest");
- base::Delete(test_path, true);
+ base::DeleteFile(test_path, true);
file_util::CreateDirectory(test_path);
profile_path_ = test_path.AppendASCII("profile");
app_path_ = test_path.AppendASCII("app");
diff --git a/chrome/browser/importer/firefox_profile_lock_posix.cc b/chrome/browser/importer/firefox_profile_lock_posix.cc
index dd00b70..5beb3d4 100644
--- a/chrome/browser/importer/firefox_profile_lock_posix.cc
+++ b/chrome/browser/importer/firefox_profile_lock_posix.cc
@@ -78,7 +78,7 @@ void FirefoxProfileLock::Unlock() {
return;
close(lock_fd_);
lock_fd_ = -1;
- base::Delete(old_lock_file_, false);
+ base::DeleteFile(old_lock_file_, false);
}
bool FirefoxProfileLock::HasAcquired() {
diff --git a/chrome/browser/jumplist_win.cc b/chrome/browser/jumplist_win.cc
index e7eec94..8507304 100644
--- a/chrome/browser/jumplist_win.cc
+++ b/chrome/browser/jumplist_win.cc
@@ -736,7 +736,7 @@ void JumpList::RunUpdate() {
// icon files.
base::FilePath icon_dir_old(icon_dir_.value() + L"Old");
if (base::PathExists(icon_dir_old))
- base::Delete(icon_dir_old, true);
+ base::DeleteFile(icon_dir_old, true);
base::Move(icon_dir_, icon_dir_old);
file_util::CreateDirectory(icon_dir_);
diff --git a/chrome/browser/media/webrtc_log_uploader_unittest.cc b/chrome/browser/media/webrtc_log_uploader_unittest.cc
index c066461..2c8ecc0 100644
--- a/chrome/browser/media/webrtc_log_uploader_unittest.cc
+++ b/chrome/browser/media/webrtc_log_uploader_unittest.cc
@@ -89,7 +89,7 @@ TEST_F(WebRtcLogUploaderTest, AddUploadedLogInfoToUploadListFile) {
// Get a temporary filename. We don't want the file to exist to begin with
// since that's the normal use case, hence the delete.
ASSERT_TRUE(file_util::CreateTemporaryFile(&test_list_path_));
- EXPECT_TRUE(Delete(test_list_path_, false));
+ EXPECT_TRUE(base::DeleteFile(test_list_path_, false));
scoped_ptr<WebRtcLogUploader> webrtc_log_uploader_(
new WebRtcLogUploader());
webrtc_log_uploader_->SetUploadPathForTesting(test_list_path_);
diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
index e36e3e2..a023b75 100644
--- a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
+++ b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
@@ -288,7 +288,7 @@ TEST_F(NativeMediaFileUtilTest, CopySourceFiltering) {
for (size_t i = 0; i < arraysize(kFilteringTestCases); ++i) {
// Always start with an empty destination directory.
// Copying to a non-empty destination directory is an invalid operation.
- ASSERT_TRUE(base::Delete(dest_path, true));
+ ASSERT_TRUE(base::DeleteFile(dest_path, true));
ASSERT_TRUE(file_util::CreateDirectory(dest_path));
FileSystemURL root_url = CreateURL(FPL(""));
@@ -318,7 +318,7 @@ TEST_F(NativeMediaFileUtilTest, CopyDestFiltering) {
if (loop_count == 1) {
// Reset the test directory between the two loops to remove old
// directories and create new ones that should pre-exist.
- ASSERT_TRUE(base::Delete(root_path(), true));
+ ASSERT_TRUE(base::DeleteFile(root_path(), true));
ASSERT_TRUE(file_util::CreateDirectory(root_path()));
PopulateDirectoryWithTestCases(root_path(),
kFilteringTestCases,
@@ -387,7 +387,7 @@ TEST_F(NativeMediaFileUtilTest, MoveSourceFiltering) {
for (size_t i = 0; i < arraysize(kFilteringTestCases); ++i) {
// Always start with an empty destination directory.
// Moving to a non-empty destination directory is an invalid operation.
- ASSERT_TRUE(base::Delete(dest_path, true));
+ ASSERT_TRUE(base::DeleteFile(dest_path, true));
ASSERT_TRUE(file_util::CreateDirectory(dest_path));
FileSystemURL root_url = CreateURL(FPL(""));
@@ -417,7 +417,7 @@ TEST_F(NativeMediaFileUtilTest, MoveDestFiltering) {
if (loop_count == 1) {
// Reset the test directory between the two loops to remove old
// directories and create new ones that should pre-exist.
- ASSERT_TRUE(base::Delete(root_path(), true));
+ ASSERT_TRUE(base::DeleteFile(root_path(), true));
ASSERT_TRUE(file_util::CreateDirectory(root_path()));
PopulateDirectoryWithTestCases(root_path(),
kFilteringTestCases,
diff --git a/chrome/browser/nacl_host/nacl_browser.cc b/chrome/browser/nacl_host/nacl_browser.cc
index 33b628c..ea9ea0f 100644
--- a/chrome/browser/nacl_host/nacl_browser.cc
+++ b/chrome/browser/nacl_host/nacl_browser.cc
@@ -98,7 +98,7 @@ void WriteCache(const base::FilePath& filename, const Pickle* pickle) {
void RemoveCache(const base::FilePath& filename,
const base::Closure& callback) {
- base::Delete(filename, false);
+ base::DeleteFile(filename, false);
content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
callback);
}
diff --git a/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc b/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc
index 6e1c074..02b4a8c 100644
--- a/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc
+++ b/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc
@@ -57,12 +57,12 @@ class NaClGdbTest : public PPAPINaClNewlibTest {
EXPECT_TRUE(file_util::ReadFileToString(mock_nacl_gdb_file, &content));
EXPECT_STREQ("PASS", content.c_str());
- EXPECT_TRUE(base::Delete(mock_nacl_gdb_file, false));
+ EXPECT_TRUE(base::DeleteFile(mock_nacl_gdb_file, false));
content.clear();
EXPECT_TRUE(file_util::ReadFileToString(script_, &content));
EXPECT_STREQ("PASS", content.c_str());
- EXPECT_TRUE(base::Delete(script_, false));
+ EXPECT_TRUE(base::DeleteFile(script_, false));
}
private:
diff --git a/chrome/browser/net/net_log_temp_file_unittest.cc b/chrome/browser/net/net_log_temp_file_unittest.cc
index 3d062bf..8370f9f 100644
--- a/chrome/browser/net/net_log_temp_file_unittest.cc
+++ b/chrome/browser/net/net_log_temp_file_unittest.cc
@@ -79,7 +79,7 @@ class NetLogTempFileTest : public ::testing::Test {
virtual void TearDown() OVERRIDE {
// Delete the temporary file we have created.
- ASSERT_TRUE(base::Delete(net_export_log_, false));
+ ASSERT_TRUE(base::DeleteFile(net_export_log_, false));
}
std::string GetStateString() const {
diff --git a/chrome/browser/net/url_fixer_upper_unittest.cc b/chrome/browser/net/url_fixer_upper_unittest.cc
index 5dc335c..19e796b 100644
--- a/chrome/browser/net/url_fixer_upper_unittest.cc
+++ b/chrome/browser/net/url_fixer_upper_unittest.cc
@@ -459,7 +459,7 @@ TEST(URLFixerUpperTest, FixupFile) {
file_cases[i].desired_tld).possibly_invalid_spec());
}
- EXPECT_TRUE(base::Delete(original, false));
+ EXPECT_TRUE(base::DeleteFile(original, false));
}
TEST(URLFixerUpperTest, FixupRelativeFile) {
@@ -483,7 +483,7 @@ TEST(URLFixerUpperTest, FixupRelativeFile) {
// are no backslashes
EXPECT_TRUE(IsMatchingFileURL(URLFixerUpper::FixupRelativeFile(dir,
file_part).possibly_invalid_spec(), full_path));
- EXPECT_TRUE(base::Delete(full_path, false));
+ EXPECT_TRUE(base::DeleteFile(full_path, false));
// create a filename we know doesn't exist and make sure it doesn't get
// fixed up to a file URL
@@ -527,8 +527,8 @@ TEST(URLFixerUpperTest, FixupRelativeFile) {
base::FilePath(relative_file_str)).possibly_invalid_spec(), full_path));
// done with the subdir
- EXPECT_TRUE(base::Delete(full_path, false));
- EXPECT_TRUE(base::Delete(new_dir, true));
+ EXPECT_TRUE(base::DeleteFile(full_path, false));
+ EXPECT_TRUE(base::DeleteFile(new_dir, true));
// Test that an obvious HTTP URL isn't accidentally treated as an absolute
// file path (on account of system-specific craziness).
diff --git a/chrome/browser/page_cycler/page_cycler.cc b/chrome/browser/page_cycler/page_cycler.cc
index 0cb173f..1f1c47e 100644
--- a/chrome/browser/page_cycler/page_cycler.cc
+++ b/chrome/browser/page_cycler/page_cycler.cc
@@ -222,7 +222,7 @@ void PageCycler::WriteResultsOnBackgroundThread(const std::string& output) {
error_.size());
} else if (base::PathExists(errors_file_)) {
// If there is an old error file, delete it to avoid confusion.
- base::Delete(errors_file_, false);
+ base::DeleteFile(errors_file_, false);
}
}
if (aborted_) {
diff --git a/chrome/browser/pepper_flash_settings_manager.cc b/chrome/browser/pepper_flash_settings_manager.cc
index a731bb9..2886b4e 100644
--- a/chrome/browser/pepper_flash_settings_manager.cc
+++ b/chrome/browser/pepper_flash_settings_manager.cc
@@ -461,7 +461,7 @@ void PepperFlashSettingsManager::Core::DeauthorizeContentLicensesOnBlockingPool(
// Wipe that file.
const base::FilePath& device_id_path =
chrome::DeviceIDFetcher::GetLegacyDeviceIDPath(profile_path);
- bool success = base::Delete(device_id_path, false);
+ bool success = base::DeleteFile(device_id_path, false);
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
diff --git a/chrome/browser/policy/cloud/resource_cache.cc b/chrome/browser/policy/cloud/resource_cache.cc
index 82aea6d..5523782 100644
--- a/chrome/browser/policy/cloud/resource_cache.cc
+++ b/chrome/browser/policy/cloud/resource_cache.cc
@@ -62,7 +62,7 @@ bool ResourceCache::Store(const std::string& key,
// to protect against such races, especially as the cache is cross-platform
// and therefore cannot use any POSIX-only tricks.
return VerifyKeyPathAndGetSubkeyPath(key, true, subkey, &subkey_path) &&
- base::Delete(subkey_path, false) &&
+ base::DeleteFile(subkey_path, false) &&
file_util::WriteFile(subkey_path, data.data(), data.size());
}
@@ -109,11 +109,11 @@ void ResourceCache::Delete(const std::string& key, const std::string& subkey) {
DCHECK(CalledOnValidThread());
base::FilePath subkey_path;
if (VerifyKeyPathAndGetSubkeyPath(key, false, subkey, &subkey_path))
- base::Delete(subkey_path, false);
+ base::DeleteFile(subkey_path, false);
// Delete() does nothing if the directory given to it is not empty. Hence, the
// call below deletes the directory representing |key| if its last subkey was
// just removed and does nothing otherwise.
- base::Delete(subkey_path.DirName(), false);
+ base::DeleteFile(subkey_path.DirName(), false);
}
void ResourceCache::PurgeOtherSubkeys(
@@ -138,12 +138,12 @@ void ResourceCache::PurgeOtherSubkeys(
path = enumerator.Next()) {
const std::string name(path.BaseName().MaybeAsASCII());
if (encoded_subkeys_to_keep.find(name) == encoded_subkeys_to_keep.end())
- base::Delete(path, false);
+ base::DeleteFile(path, false);
}
// Delete() does nothing if the directory given to it is not empty. Hence, the
// call below deletes the directory representing |key| if all of its subkeys
// were just removed and does nothing otherwise.
- base::Delete(key_path, false);
+ base::DeleteFile(key_path, false);
}
bool ResourceCache::VerifyKeyPath(const std::string& key,
diff --git a/chrome/browser/policy/cloud/user_cloud_policy_store.cc b/chrome/browser/policy/cloud/user_cloud_policy_store.cc
index 30e00dc..3fa53d5 100644
--- a/chrome/browser/policy/cloud/user_cloud_policy_store.cc
+++ b/chrome/browser/policy/cloud/user_cloud_policy_store.cc
@@ -122,7 +122,7 @@ void UserCloudPolicyStore::LoadImmediately() {
void UserCloudPolicyStore::Clear() {
content::BrowserThread::PostTask(
content::BrowserThread::FILE, FROM_HERE,
- base::Bind(base::IgnoreResult(&base::Delete),
+ base::Bind(base::IgnoreResult(&base::DeleteFile),
backing_file_path_,
false));
policy_.reset();
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index f10b79a..49fd150 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -682,7 +682,7 @@ void CreateDialogForFileImpl(content::BrowserContext* browser_context,
browser_context, modal_parent, data, print_job_title,
print_ticket, file_type));
if (delete_on_close)
- base::Delete(path_to_file, false);
+ base::DeleteFile(path_to_file, false);
}
} // namespace internal_cloud_print_helpers
diff --git a/chrome/browser/printing/print_dialog_gtk.cc b/chrome/browser/printing/print_dialog_gtk.cc
index a7bf21c..5b8f748 100644
--- a/chrome/browser/printing/print_dialog_gtk.cc
+++ b/chrome/browser/printing/print_dialog_gtk.cc
@@ -275,7 +275,7 @@ void PrintDialogGtk::PrintDocument(const printing::Metafile* metafile,
if (!error && !metafile->SaveTo(path_to_pdf_)) {
LOG(ERROR) << "Saving metafile failed";
- base::Delete(path_to_pdf_, false);
+ base::DeleteFile(path_to_pdf_, false);
error = true;
}
@@ -406,7 +406,7 @@ void PrintDialogGtk::OnJobCompleted(GtkPrintJob* print_job, GError* error) {
LOG(ERROR) << "Printing failed: " << error->message;
if (print_job)
g_object_unref(print_job);
- base::FileUtilProxy::Delete(
+ base::FileUtilProxy::DeleteFile(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(),
path_to_pdf_,
false,
diff --git a/chrome/browser/printing/printing_layout_browsertest.cc b/chrome/browser/printing/printing_layout_browsertest.cc
index 16c53e7..4e4f651 100644
--- a/chrome/browser/printing/printing_layout_browsertest.cc
+++ b/chrome/browser/printing/printing_layout_browsertest.cc
@@ -53,7 +53,7 @@ class PrintingLayoutTest : public PrintingTest<InProcessBrowserTest>,
virtual void TearDown() OVERRIDE {
InProcessBrowserTest::TearDown();
- base::Delete(emf_path_, true);
+ base::DeleteFile(emf_path_, true);
}
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
@@ -221,7 +221,7 @@ class PrintingLayoutTest : public PrintingTest<InProcessBrowserTest>,
"\" when looking for \"" << verification_name << "\"";
prn_file = file.value();
found_prn = true;
- base::Delete(file, false);
+ base::DeleteFile(file, false);
continue;
}
EXPECT_TRUE(false);
diff --git a/chrome/browser/profiles/profile_info_cache.cc b/chrome/browser/profiles/profile_info_cache.cc
index 94e4c47..dfbc6e1 100644
--- a/chrome/browser/profiles/profile_info_cache.cc
+++ b/chrome/browser/profiles/profile_info_cache.cc
@@ -165,7 +165,7 @@ void ReadBitmap(const base::FilePath& image_path,
void DeleteBitmap(const base::FilePath& image_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- base::Delete(image_path, false);
+ base::DeleteFile(image_path, false);
}
} // namespace
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 24d1b4e..6811e87 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -202,8 +202,8 @@ void ProfileManager::NukeDeletedProfilesFromDisk() {
// Delete both the profile directory and its corresponding cache.
base::FilePath cache_path;
chrome::GetUserCacheDirectory(*it, &cache_path);
- base::Delete(*it, true);
- base::Delete(cache_path, true);
+ base::DeleteFile(*it, true);
+ base::DeleteFile(cache_path, true);
}
ProfilesToDelete().clear();
}
diff --git a/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc b/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
index ac31a6a..0f48dac 100644
--- a/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
+++ b/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
@@ -391,7 +391,7 @@ TEST_F(ProfileShortcutManagerTest, DeleteSecondToLastProfileWithoutShortcut) {
GetDefaultShortcutPathForProfile(profile_2_name_);
// Delete the shortcut for the first profile, but keep the one for the 2nd.
- ASSERT_TRUE(base::Delete(profile_1_shortcut_path, false));
+ ASSERT_TRUE(base::DeleteFile(profile_1_shortcut_path, false));
ASSERT_FALSE(base::PathExists(profile_1_shortcut_path));
ASSERT_TRUE(base::PathExists(profile_2_shortcut_path));
@@ -415,7 +415,7 @@ TEST_F(ProfileShortcutManagerTest, DeleteSecondToLastProfileWithShortcut) {
GetDefaultShortcutPathForProfile(profile_2_name_);
// Delete the shortcut for the first profile, but keep the one for the 2nd.
- ASSERT_TRUE(base::Delete(profile_1_shortcut_path, false));
+ ASSERT_TRUE(base::DeleteFile(profile_1_shortcut_path, false));
ASSERT_FALSE(base::PathExists(profile_1_shortcut_path));
ASSERT_TRUE(base::PathExists(profile_2_shortcut_path));
@@ -444,8 +444,8 @@ TEST_F(ProfileShortcutManagerTest, DeleteOnlyProfileWithShortcuts) {
GetDefaultShortcutPathForProfile(profile_3_name_);
// Delete shortcuts for the first two profiles.
- ASSERT_TRUE(base::Delete(profile_1_shortcut_path, false));
- ASSERT_TRUE(base::Delete(profile_2_shortcut_path, false));
+ ASSERT_TRUE(base::DeleteFile(profile_1_shortcut_path, false));
+ ASSERT_TRUE(base::DeleteFile(profile_2_shortcut_path, false));
// Only the shortcut to the third profile should exist.
ASSERT_FALSE(base::PathExists(profile_1_shortcut_path));
@@ -503,7 +503,7 @@ TEST_F(ProfileShortcutManagerTest, RenamedDesktopShortcuts) {
profile_2_path_);
// Delete the renamed shortcut and try to create it again, which should work.
- ASSERT_TRUE(base::Delete(profile_2_shortcut_path_2, false));
+ ASSERT_TRUE(base::DeleteFile(profile_2_shortcut_path_2, false));
EXPECT_FALSE(base::PathExists(profile_2_shortcut_path_2));
profile_shortcut_manager_->CreateProfileShortcut(profile_2_path_);
RunPendingTasks();
@@ -574,7 +574,7 @@ TEST_F(ProfileShortcutManagerTest, UpdateShortcutWithNoFlags) {
// Delete the shortcut that got created for this profile and instead make
// a new one without any command-line flags.
- ASSERT_TRUE(base::Delete(GetDefaultShortcutPathForProfile(string16()),
+ ASSERT_TRUE(base::DeleteFile(GetDefaultShortcutPathForProfile(string16()),
false));
const base::FilePath regular_shortcut_path =
CreateRegularShortcutWithName(FROM_HERE,
@@ -592,7 +592,7 @@ TEST_F(ProfileShortcutManagerTest, UpdateTwoShortcutsWithNoFlags) {
// Delete the shortcut that got created for this profile and instead make
// two new ones without any command-line flags.
- ASSERT_TRUE(base::Delete(GetDefaultShortcutPathForProfile(string16()),
+ ASSERT_TRUE(base::DeleteFile(GetDefaultShortcutPathForProfile(string16()),
false));
const base::FilePath regular_shortcut_path =
CreateRegularShortcutWithName(FROM_HERE,
@@ -664,7 +664,7 @@ TEST_F(ProfileShortcutManagerTest, HasProfileShortcuts) {
// Delete the shortcut and check that the function returns false.
const base::FilePath profile_2_shortcut_path =
GetDefaultShortcutPathForProfile(profile_2_name_);
- ASSERT_TRUE(base::Delete(profile_2_shortcut_path, false));
+ ASSERT_TRUE(base::DeleteFile(profile_2_shortcut_path, false));
EXPECT_FALSE(base::PathExists(profile_2_shortcut_path));
profile_shortcut_manager_->HasProfileShortcuts(profile_2_path_, callback);
RunPendingTasks();
@@ -752,7 +752,7 @@ TEST_F(ProfileShortcutManagerTest,
GetDefaultShortcutPathForProfile(profile_2_name_);
// Delete the shortcut for the first profile, but keep the one for the 2nd.
- ASSERT_TRUE(base::Delete(profile_1_shortcut_path, false));
+ ASSERT_TRUE(base::DeleteFile(profile_1_shortcut_path, false));
ASSERT_FALSE(base::PathExists(profile_1_shortcut_path));
ASSERT_TRUE(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 b0a0937..cc8c250 100644
--- a/chrome/browser/profiles/profile_shortcut_manager_win.cc
+++ b/chrome/browser/profiles/profile_shortcut_manager_win.cc
@@ -292,7 +292,7 @@ void RenameChromeDesktopShortcutForProfile(
const base::FilePath possible_new_system_shortcut =
system_shortcuts_directory.Append(new_shortcut_filename);
if (base::PathExists(possible_new_system_shortcut))
- base::Delete(old_shortcut_path, false);
+ base::DeleteFile(old_shortcut_path, false);
else if (!RenameDesktopShortcut(old_shortcut_path, new_shortcut_path))
DLOG(ERROR) << "Could not rename Windows profile desktop shortcut.";
} else {
@@ -437,9 +437,9 @@ void DeleteDesktopShortcutsAndIconFile(const base::FilePath& profile_path,
BrowserDistribution* distribution = BrowserDistribution::GetDistribution();
for (size_t i = 0; i < shortcuts.size(); ++i) {
- // Use base::Delete() instead of ShellUtil::RemoveShortcut(), as the
+ // Use base::DeleteFile() instead of ShellUtil::RemoveShortcut(), as the
// latter causes non-profile taskbar shortcuts to be unpinned.
- base::Delete(shortcuts[i], false);
+ base::DeleteFile(shortcuts[i], false);
// Notify the shell that the shortcut was deleted to ensure desktop refresh.
SHChangeNotify(SHCNE_DELETE, SHCNF_PATH, shortcuts[i].value().c_str(),
NULL);
@@ -447,7 +447,7 @@ void DeleteDesktopShortcutsAndIconFile(const base::FilePath& profile_path,
const base::FilePath icon_path =
profile_path.AppendASCII(profiles::internal::kProfileIconFileName);
- base::Delete(icon_path, false);
+ base::DeleteFile(icon_path, false);
// If |ensure_shortcuts_remain| is true and deleting this profile caused the
// last shortcuts to be removed, re-create a regular non-profile shortcut.
diff --git a/chrome/browser/safe_browsing/download_feedback.cc b/chrome/browser/safe_browsing/download_feedback.cc
index 6748d2db..b23a313 100644
--- a/chrome/browser/safe_browsing/download_feedback.cc
+++ b/chrome/browser/safe_browsing/download_feedback.cc
@@ -108,10 +108,10 @@ DownloadFeedbackImpl::~DownloadFeedbackImpl() {
uploader_.reset();
}
- base::FileUtilProxy::Delete(file_task_runner_.get(),
- file_path_,
- false,
- base::FileUtilProxy::StatusCallback());
+ base::FileUtilProxy::DeleteFile(file_task_runner_.get(),
+ file_path_,
+ false,
+ base::FileUtilProxy::StatusCallback());
}
void DownloadFeedbackImpl::Start(const base::Closure& finish_callback) {
diff --git a/chrome/browser/safe_browsing/download_feedback_service.cc b/chrome/browser/safe_browsing/download_feedback_service.cc
index 8c189aa..5465ef6 100644
--- a/chrome/browser/safe_browsing/download_feedback_service.cc
+++ b/chrome/browser/safe_browsing/download_feedback_service.cc
@@ -177,10 +177,10 @@ void DownloadFeedbackService::BeginFeedbackOrDeleteFile(
if (service) {
service->BeginFeedback(ping_request, ping_response, path);
} else {
- base::FileUtilProxy::Delete(file_task_runner.get(),
- path,
- false,
- base::FileUtilProxy::StatusCallback());
+ base::FileUtilProxy::DeleteFile(file_task_runner.get(),
+ path,
+ false,
+ base::FileUtilProxy::StatusCallback());
}
}
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.cc b/chrome/browser/safe_browsing/safe_browsing_database.cc
index ce2483c..dd1802f 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database.cc
@@ -1486,7 +1486,7 @@ void SafeBrowsingDatabaseNew::LoadPrefixSet() {
// TODO(shess): Track failure to delete?
base::FilePath bloom_filter_filename =
BloomFilterForFilename(browse_filename_);
- base::Delete(bloom_filter_filename, false);
+ base::DeleteFile(bloom_filter_filename, false);
const base::TimeTicks before = base::TimeTicks::Now();
browse_prefix_set_.reset(safe_browsing::PrefixSet::LoadFile(
@@ -1522,24 +1522,24 @@ bool SafeBrowsingDatabaseNew::Delete() {
base::FilePath bloom_filter_filename =
BloomFilterForFilename(browse_filename_);
- const bool r5 = base::Delete(bloom_filter_filename, false);
+ const bool r5 = base::DeleteFile(bloom_filter_filename, false);
if (!r5)
RecordFailure(FAILURE_DATABASE_FILTER_DELETE);
- const bool r6 = base::Delete(browse_prefix_set_filename_, false);
+ const bool r6 = base::DeleteFile(browse_prefix_set_filename_, false);
if (!r6)
RecordFailure(FAILURE_BROWSE_PREFIX_SET_DELETE);
- const bool r7 = base::Delete(extension_blacklist_filename_, false);
+ const bool r7 = base::DeleteFile(extension_blacklist_filename_, false);
if (!r7)
RecordFailure(FAILURE_EXTENSION_BLACKLIST_DELETE);
- const bool r8 = base::Delete(side_effect_free_whitelist_filename_,
+ const bool r8 = base::DeleteFile(side_effect_free_whitelist_filename_,
false);
if (!r8)
RecordFailure(FAILURE_SIDE_EFFECT_FREE_WHITELIST_DELETE);
- const bool r9 = base::Delete(
+ const bool r9 = base::DeleteFile(
side_effect_free_whitelist_prefix_set_filename_,
false);
if (!r9)
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
index b81e0b0..315d684 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
@@ -1658,7 +1658,7 @@ TEST_F(SafeBrowsingDatabaseTest, FilterFile) {
&matching_list, &prefix_hits, &full_hashes, now));
// If there is no filter file, the database cannot find malware urls.
- base::Delete(filter_file, false);
+ base::DeleteFile(filter_file, false);
ASSERT_FALSE(base::PathExists(filter_file));
database_.reset(new SafeBrowsingDatabaseNew);
database_->Init(database_filename_);
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file.cc b/chrome/browser/safe_browsing/safe_browsing_store_file.cc
index 50cacb3..628907c 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_file.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_store_file.cc
@@ -186,7 +186,7 @@ void SafeBrowsingStoreFile::CheckForOriginalAndDelete(
static_cast<int>(size / 1024));
}
- if (base::Delete(original_filename, false)) {
+ if (base::DeleteFile(original_filename, false)) {
RecordFormatEvent(FORMAT_EVENT_DELETED_ORIGINAL);
} else {
RecordFormatEvent(FORMAT_EVENT_DELETED_ORIGINAL_FAILED);
@@ -196,7 +196,7 @@ void SafeBrowsingStoreFile::CheckForOriginalAndDelete(
// the weeds.
const base::FilePath journal_filename(
current_filename.DirName().AppendASCII("Safe Browsing-journal"));
- base::Delete(journal_filename, false);
+ base::DeleteFile(journal_filename, false);
}
}
@@ -654,7 +654,7 @@ bool SafeBrowsingStoreFile::DoUpdate(
// Close the file handle and swizzle the file into place.
new_file_.reset();
- if (!base::Delete(filename_, false) &&
+ if (!base::DeleteFile(filename_, false) &&
base::PathExists(filename_))
return false;
@@ -735,14 +735,14 @@ void SafeBrowsingStoreFile::DeleteSubChunk(int32 chunk_id) {
// static
bool SafeBrowsingStoreFile::DeleteStore(const base::FilePath& basename) {
- if (!base::Delete(basename, false) &&
+ if (!base::DeleteFile(basename, false) &&
base::PathExists(basename)) {
NOTREACHED();
return false;
}
const base::FilePath new_filename = TemporaryFileForFilename(basename);
- if (!base::Delete(new_filename, false) &&
+ if (!base::DeleteFile(new_filename, false) &&
base::PathExists(new_filename)) {
NOTREACHED();
return false;
@@ -754,7 +754,7 @@ bool SafeBrowsingStoreFile::DeleteStore(const base::FilePath& basename) {
const base::FilePath journal_filename(
basename.value() + FILE_PATH_LITERAL("-journal"));
if (base::PathExists(journal_filename))
- base::Delete(journal_filename, false);
+ base::DeleteFile(journal_filename, false);
return true;
}
diff --git a/chrome/browser/sessions/session_backend.cc b/chrome/browser/sessions/session_backend.cc
index 19431d8..018b679 100644
--- a/chrome/browser/sessions/session_backend.cc
+++ b/chrome/browser/sessions/session_backend.cc
@@ -265,7 +265,7 @@ bool SessionBackend::ReadLastSessionCommandsImpl(
void SessionBackend::DeleteLastSession() {
Init();
- base::Delete(GetLastSessionPath(), false);
+ base::DeleteFile(GetLastSessionPath(), false);
}
void SessionBackend::MoveCurrentSessionToLastSession() {
@@ -275,7 +275,7 @@ void SessionBackend::MoveCurrentSessionToLastSession() {
const base::FilePath current_session_path = GetCurrentSessionPath();
const base::FilePath last_session_path = GetLastSessionPath();
if (base::PathExists(last_session_path))
- base::Delete(last_session_path, false);
+ base::DeleteFile(last_session_path, false);
if (base::PathExists(current_session_path)) {
int64 file_size;
if (file_util::GetFileSize(current_session_path, &file_size)) {
@@ -291,7 +291,7 @@ void SessionBackend::MoveCurrentSessionToLastSession() {
}
if (base::PathExists(current_session_path))
- base::Delete(current_session_path, false);
+ base::DeleteFile(current_session_path, false);
// Create and open the file for the current session.
ResetFile();
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc
index 3a692a9..64bb162 100644
--- a/chrome/browser/shell_integration_linux.cc
+++ b/chrome/browser/shell_integration_linux.cc
@@ -171,7 +171,7 @@ bool CreateShortcutOnDesktop(const base::FilePath& shortcut_filename,
void DeleteShortcutOnDesktop(const base::FilePath& shortcut_filename) {
base::FilePath desktop_path;
if (PathService::Get(base::DIR_USER_DESKTOP, &desktop_path))
- base::Delete(desktop_path.Append(shortcut_filename), false);
+ base::DeleteFile(desktop_path.Append(shortcut_filename), false);
}
// Creates a shortcut with |shortcut_filename| and |contents| in the system
diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
index 67dc923..ff84d7f 100644
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
@@ -101,7 +101,7 @@ scoped_ptr<DictionaryFile> OpenDictionaryFile(
NULL,
NULL);
} else {
- base::Delete(file->path, false);
+ base::DeleteFile(file->path, false);
}
return file.Pass();
@@ -148,7 +148,7 @@ bool SaveDictionaryData(scoped_ptr<std::string> data,
#endif
if (!success) {
- base::Delete(path, false);
+ base::DeleteFile(path, false);
return false;
}
}
diff --git a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
index 45754ce..2d1bda7e 100644
--- a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
+++ b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
@@ -80,6 +80,6 @@ IN_PROC_BROWSER_TEST_F(SpellcheckServiceBrowserTest, DeleteCorruptedBDICT) {
SpellcheckService::GetStatusEvent());
if (base::PathExists(bdict_path)) {
ADD_FAILURE();
- EXPECT_TRUE(base::Delete(bdict_path, true));
+ EXPECT_TRUE(base::DeleteFile(bdict_path, true));
}
}
diff --git a/chrome/browser/storage_monitor/storage_monitor_linux_unittest.cc b/chrome/browser/storage_monitor/storage_monitor_linux_unittest.cc
index a8c82a5..047711a 100644
--- a/chrome/browser/storage_monitor/storage_monitor_linux_unittest.cc
+++ b/chrome/browser/storage_monitor/storage_monitor_linux_unittest.cc
@@ -235,7 +235,7 @@ class StorageMonitorLinuxTest : public testing::Test {
void RemoveDCIMDirFromMountPoint(const std::string& dir) {
base::FilePath dcim =
scoped_temp_dir_.path().AppendASCII(dir).Append(kDCIMDirectoryName);
- base::Delete(dcim, false);
+ base::DeleteFile(dcim, false);
}
MockRemovableStorageObserver& observer() {
@@ -558,7 +558,7 @@ TEST_F(StorageMonitorLinuxTest, MultipleMountPointsWithNonDCIMDevices) {
MtabTestData test_data5[] = {
MtabTestData(kDeviceNoDCIM, test_path_b.value(), kValidFS),
};
- base::Delete(test_path_b.Append(kDCIMDirectoryName), false);
+ base::DeleteFile(test_path_b.Append(kDCIMDirectoryName), false);
AppendToMtabAndRunLoop(test_data5, arraysize(test_data5));
EXPECT_EQ(4, observer().attach_calls());
EXPECT_EQ(2, observer().detach_calls());
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index d53f7cc..294742e 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -1395,7 +1395,7 @@ void SyncBackendHost::Core::DoRetryConfiguration(
void SyncBackendHost::Core::DeleteSyncDataFolder() {
DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
if (base::DirectoryExists(sync_data_folder_path_)) {
- if (!base::Delete(sync_data_folder_path_, true))
+ if (!base::DeleteFile(sync_data_folder_path_, true))
SLOG(DFATAL) << "Could not delete the Sync Data folder.";
}
}
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 7ca84f4..88ee1ab 100644
--- a/chrome/browser/ui/app_list/app_list_service_mac.mm
+++ b/chrome/browser/ui/app_list/app_list_service_mac.mm
@@ -193,7 +193,7 @@ void CheckAppListShimOnFileThread(const base::FilePath& profile_path) {
// Sanity check because deleting things recursively is scary.
CHECK(install_path.MatchesExtension(".app"));
- base::Delete(install_path, true /* recursive */);
+ base::DeleteFile(install_path, true /* recursive */);
}
void CreateShortcutsInDefaultLocation(
diff --git a/chrome/browser/ui/network_profile_bubble.cc b/chrome/browser/ui/network_profile_bubble.cc
index 9a6cbca..c2169b1 100644
--- a/chrome/browser/ui/network_profile_bubble.cc
+++ b/chrome/browser/ui/network_profile_bubble.cc
@@ -135,7 +135,7 @@ void NetworkProfileBubble::CheckNetworkProfile(
} else {
RecordUmaEvent(METRIC_CHECK_IO_FAILED);
}
- base::Delete(temp_file, false);
+ base::DeleteFile(temp_file, false);
}
if (profile_on_network) {
RecordUmaEvent(METRIC_PROFILE_ON_NETWORK);
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
index 443cdac..9adb33f 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -323,7 +323,7 @@ void CloseDebugLogFile(PassPlatformFile pass_platform_file) {
void CloseAndDeleteDebugLogFile(PassPlatformFile pass_platform_file,
const base::FilePath& file_path) {
CloseDebugLogFile(pass_platform_file);
- base::Delete(file_path, false);
+ base::DeleteFile(file_path, false);
}
// Called upon completion of |WriteDebugLogToFile|. Closes file
diff --git a/chrome/browser/value_store/leveldb_value_store.cc b/chrome/browser/value_store/leveldb_value_store.cc
index d192399..85f9e2b 100644
--- a/chrome/browser/value_store/leveldb_value_store.cc
+++ b/chrome/browser/value_store/leveldb_value_store.cc
@@ -94,7 +94,7 @@ LeveldbValueStore::~LeveldbValueStore() {
if (db_ && IsEmpty()) {
// Close |db_| now to release any lock on the directory.
db_.reset();
- if (!base::Delete(db_path_, true)) {
+ if (!base::DeleteFile(db_path_, true)) {
LOG(WARNING) << "Failed to delete LeveldbValueStore database " <<
db_path_.value();
}
diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm
index e731611..0bebc59 100644
--- a/chrome/browser/web_applications/web_app_mac.mm
+++ b/chrome/browser/web_applications/web_app_mac.mm
@@ -231,10 +231,10 @@ void UpdateAppShortcutsSubdirLocalizedName(
void DeletePathAndParentIfEmpty(const base::FilePath& app_path) {
DCHECK(!app_path.empty());
- base::Delete(app_path, true);
+ base::DeleteFile(app_path, true);
base::FilePath apps_folder = app_path.DirName();
if (file_util::IsDirectoryEmpty(apps_folder))
- base::Delete(apps_folder, false);
+ base::DeleteFile(apps_folder, false);
}
bool IsShimForProfile(const base::FilePath& base_name,
@@ -428,7 +428,7 @@ void WebAppShortcutCreator::DeleteShortcuts() {
// In case the user has moved/renamed/copied the app bundle.
base::FilePath bundle_path = GetAppBundleById(GetBundleIdentifier());
if (!bundle_path.empty())
- base::Delete(bundle_path, true);
+ base::DeleteFile(bundle_path, true);
// Delete the internal one.
DeletePathAndParentIfEmpty(app_data_path_.Append(GetShortcutName()));
@@ -436,7 +436,7 @@ void WebAppShortcutCreator::DeleteShortcuts() {
bool WebAppShortcutCreator::UpdateShortcuts() {
std::vector<base::FilePath> paths;
- base::Delete(app_data_path_.Append(GetShortcutName()), true);
+ base::DeleteFile(app_data_path_.Append(GetShortcutName()), true);
paths.push_back(app_data_path_);
base::FilePath dst_path = GetDestinationPath();
@@ -448,7 +448,7 @@ bool WebAppShortcutCreator::UpdateShortcuts() {
app_path = GetAppBundleById(GetBundleIdentifier());
if (!app_path.empty()) {
- base::Delete(app_path, true);
+ base::DeleteFile(app_path, true);
paths.push_back(app_path.DirName());
}
diff --git a/chrome/browser/web_applications/web_app_mac_unittest.mm b/chrome/browser/web_applications/web_app_mac_unittest.mm
index 34ca570..ad056e7 100644
--- a/chrome/browser/web_applications/web_app_mac_unittest.mm
+++ b/chrome/browser/web_applications/web_app_mac_unittest.mm
@@ -139,7 +139,7 @@ TEST(WebAppShortcutCreatorTest, UpdateShortcuts) {
shortcut_creator.BuildShortcut(other_folder.Append(app_name));
- EXPECT_TRUE(base::Delete(
+ EXPECT_TRUE(base::DeleteFile(
other_folder.Append(app_name).Append("Contents"), true));
EXPECT_TRUE(shortcut_creator.UpdateShortcuts());
@@ -153,7 +153,7 @@ TEST(WebAppShortcutCreatorTest, UpdateShortcuts) {
shortcut_creator.BuildShortcut(other_folder.Append(app_name));
- EXPECT_TRUE(base::Delete(
+ EXPECT_TRUE(base::DeleteFile(
other_folder.Append(app_name).Append("Contents"), true));
EXPECT_FALSE(shortcut_creator.UpdateShortcuts());
diff --git a/chrome/browser/web_applications/web_app_win.cc b/chrome/browser/web_applications/web_app_win.cc
index 34205ff..3a6446d 100644
--- a/chrome/browser/web_applications/web_app_win.cc
+++ b/chrome/browser/web_applications/web_app_win.cc
@@ -320,7 +320,7 @@ void GetShortcutLocationsAndDeleteShortcuts(
// Any shortcut could have been pinned, either by chrome or the user, so
// they are all unpinned.
base::win::TaskbarUnpinShortcutLink(j->value().c_str());
- base::Delete(*j, false);
+ base::DeleteFile(*j, false);
}
}
}
@@ -461,7 +461,7 @@ void DeletePlatformShortcuts(
if (PathService::Get(base::DIR_START_MENU, &chrome_apps_dir)) {
chrome_apps_dir = chrome_apps_dir.Append(GetAppShortcutsSubdirName());
if (file_util::IsDirectoryEmpty(chrome_apps_dir))
- base::Delete(chrome_apps_dir, false);
+ base::DeleteFile(chrome_apps_dir, false);
}
}
@@ -474,7 +474,7 @@ void DeleteAllShortcutsForProfile(const base::FilePath& profile_path) {
if (PathService::Get(base::DIR_START_MENU, &chrome_apps_dir)) {
chrome_apps_dir = chrome_apps_dir.Append(GetAppShortcutsSubdirName());
if (file_util::IsDirectoryEmpty(chrome_apps_dir))
- base::Delete(chrome_apps_dir, false);
+ base::DeleteFile(chrome_apps_dir, false);
}
}
diff --git a/chrome/common/auto_start_linux.cc b/chrome/common/auto_start_linux.cc
index b06c6f8..7d6c660 100644
--- a/chrome/common/auto_start_linux.cc
+++ b/chrome/common/auto_start_linux.cc
@@ -50,7 +50,7 @@ bool AutoStart::AddApplication(const std::string& autostart_filename,
if (file_util::WriteFile(autostart_file, autostart_file_contents.c_str(),
content_length) !=
static_cast<int>(content_length)) {
- base::Delete(autostart_file, false);
+ base::DeleteFile(autostart_file, false);
return false;
}
return true;
@@ -61,7 +61,7 @@ bool AutoStart::Remove(const std::string& autostart_filename) {
base::FilePath autostart_directory = GetAutostartDirectory(environment.get());
base::FilePath autostart_file =
autostart_directory.Append(autostart_filename);
- return base::Delete(autostart_file, false);
+ return base::DeleteFile(autostart_file, false);
}
bool AutoStart::GetAutostartFileContents(
diff --git a/chrome/common/extensions/api/storage/storage_schema_manifest_handler_unittest.cc b/chrome/common/extensions/api/storage/storage_schema_manifest_handler_unittest.cc
index 8085163..4a6b4d8 100644
--- a/chrome/common/extensions/api/storage/storage_schema_manifest_handler_unittest.cc
+++ b/chrome/common/extensions/api/storage/storage_schema_manifest_handler_unittest.cc
@@ -44,7 +44,7 @@ class StorageSchemaManifestHandlerTest : public testing::Test {
return NULL;
base::FilePath schema_path = temp_dir_.path().AppendASCII("schema.json");
if (schema.empty()) {
- base::Delete(schema_path, false);
+ base::DeleteFile(schema_path, false);
} else {
if (file_util::WriteFile(schema_path, schema.data(), schema.size()) !=
static_cast<int>(schema.size())) {
diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc
index 24d23cb..16b1e54 100644
--- a/chrome/common/extensions/extension_file_util.cc
+++ b/chrome/common/extensions/extension_file_util.cc
@@ -125,7 +125,7 @@ void UninstallExtension(const base::FilePath& extensions_dir,
// We don't care about the return value. If this fails (and it can, due to
// plugins that aren't unloaded yet), it will get cleaned up by
// ExtensionService::GarbageCollectExtensions.
- base::Delete(extensions_dir.AppendASCII(id), true); // recursive.
+ base::DeleteFile(extensions_dir.AppendASCII(id), true); // recursive.
}
scoped_refptr<Extension> LoadExtension(const base::FilePath& extension_path,
@@ -345,7 +345,7 @@ void GarbageCollectExtensions(
// Clean up temporary files left if Chrome crashed or quit in the middle
// of an extension install.
if (basename.value() == kTempDirectoryName) {
- base::Delete(extension_path, true); // Recursive
+ base::DeleteFile(extension_path, true); // Recursive
continue;
}
@@ -362,7 +362,7 @@ void GarbageCollectExtensions(
"directory: " << basename.value();
DVLOG(1) << "Deleting invalid extension directory "
<< extension_path.value() << ".";
- base::Delete(extension_path, true); // Recursive.
+ base::DeleteFile(extension_path, true); // Recursive.
continue;
}
@@ -375,7 +375,7 @@ void GarbageCollectExtensions(
if (iter_pair.first == iter_pair.second) {
DVLOG(1) << "Deleting unreferenced install for directory "
<< extension_path.LossyDisplayName() << ".";
- base::Delete(extension_path, true); // Recursive.
+ base::DeleteFile(extension_path, true); // Recursive.
continue;
}
@@ -396,7 +396,7 @@ void GarbageCollectExtensions(
if (!knownVersion) {
DVLOG(1) << "Deleting old version for directory "
<< version_dir.LossyDisplayName() << ".";
- base::Delete(version_dir, true); // Recursive.
+ base::DeleteFile(version_dir, true); // Recursive.
}
}
}
@@ -570,7 +570,7 @@ base::FilePath GetInstallTempDir(const base::FilePath& extensions_dir) {
}
void DeleteFile(const base::FilePath& path, bool recursive) {
- base::Delete(path, recursive);
+ base::DeleteFile(path, recursive);
}
} // namespace extension_file_util
diff --git a/chrome/common/extensions/extension_file_util_unittest.cc b/chrome/common/extensions/extension_file_util_unittest.cc
index ad8b1e1..24e102c9 100644
--- a/chrome/common/extensions/extension_file_util_unittest.cc
+++ b/chrome/common/extensions/extension_file_util_unittest.cc
@@ -339,7 +339,7 @@ TEST_F(ExtensionFileUtilTest, ExtensionResourceURLToFilePath) {
" For the path " << url;
}
// Remove temp files.
- ASSERT_TRUE(base::Delete(root_path, true));
+ ASSERT_TRUE(base::DeleteFile(root_path, true));
}
static scoped_refptr<Extension> LoadExtensionManifest(
diff --git a/chrome/common/service_process_util_unittest.cc b/chrome/common/service_process_util_unittest.cc
index 92c5340..b38ee5a 100644
--- a/chrome/common/service_process_util_unittest.cc
+++ b/chrome/common/service_process_util_unittest.cc
@@ -298,7 +298,7 @@ class ServiceProcessStateFileManipulationTest : public ::testing::Test {
};
void DeleteFunc(const base::FilePath& file) {
- EXPECT_TRUE(base::Delete(file, true));
+ EXPECT_TRUE(base::DeleteFile(file, true));
}
void MoveFunc(const base::FilePath& from, const base::FilePath& to) {
@@ -401,7 +401,7 @@ TEST_F(ServiceProcessStateFileManipulationTest, TrashBundle) {
ASSERT_TRUE(mock_launchd()->delete_called());
std::string path(base::mac::PathFromFSRef(bundle_ref));
base::FilePath file_path(path);
- ASSERT_TRUE(base::Delete(file_path, true));
+ ASSERT_TRUE(base::DeleteFile(file_path, true));
}
TEST_F(ServiceProcessStateFileManipulationTest, ChangeAttr) {
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
index 43750d1..3b1d781 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -257,7 +257,7 @@ void CleanupLegacyShortcuts(const InstallerState& installer_state,
shortcut_level, &uninstall_shortcut_path);
uninstall_shortcut_path = uninstall_shortcut_path.Append(
dist->GetUninstallLinkName() + installer::kLnkExt);
- base::Delete(uninstall_shortcut_path, false);
+ base::DeleteFile(uninstall_shortcut_path, false);
if (installer_state.system_install()) {
ShellUtil::RemoveShortcuts(
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index 36eb491..dab094d 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -940,7 +940,7 @@ installer::InstallStatus InstallProductsHelper(
if (cmd_line.HasSwitch(installer::switches::kInstallerData)) {
base::FilePath prefs_path(cmd_line.GetSwitchValuePath(
installer::switches::kInstallerData));
- if (!base::Delete(prefs_path, true)) {
+ if (!base::DeleteFile(prefs_path, true)) {
LOG(ERROR) << "Failed deleting master preferences file "
<< prefs_path.value()
<< ", scheduling for deletion after reboot.";
diff --git a/chrome/installer/setup/setup_util_unittest.cc b/chrome/installer/setup/setup_util_unittest.cc
index ec78c5c..177d548 100644
--- a/chrome/installer/setup/setup_util_unittest.cc
+++ b/chrome/installer/setup/setup_util_unittest.cc
@@ -124,7 +124,7 @@ TEST_F(SetupUtilTestWithDir, GetMaxVersionFromArchiveDirTest) {
installer::GetMaxVersionFromArchiveDir(test_dir_.path()));
ASSERT_EQ(version->GetString(), "1.0.0.0");
- base::Delete(chrome_dir, true);
+ base::DeleteFile(chrome_dir, true);
ASSERT_FALSE(base::PathExists(chrome_dir));
ASSERT_TRUE(installer::GetMaxVersionFromArchiveDir(test_dir_.path()) == NULL);
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index a7e7f6a..2d86535 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -270,7 +270,7 @@ bool RemoveInstallerFiles(const base::FilePath& installer_directory,
continue;
VLOG(1) << "Deleting installer path " << to_delete.value();
- if (!base::Delete(to_delete, true)) {
+ if (!base::DeleteFile(to_delete, true)) {
LOG(ERROR) << "Failed to delete path: " << to_delete.value();
success = false;
}
@@ -402,7 +402,7 @@ DeleteResult DeleteEmptyDir(const base::FilePath& path) {
if (!file_util::IsDirectoryEmpty(path))
return DELETE_NOT_EMPTY;
- if (base::Delete(path, true))
+ if (base::DeleteFile(path, true))
return DELETE_SUCCEEDED;
LOG(ERROR) << "Failed to delete folder: " << path.value();
@@ -449,7 +449,7 @@ DeleteResult DeleteLocalState(
for (size_t i = 0; i < local_state_folders.size(); ++i) {
const base::FilePath& user_local_state = local_state_folders[i];
VLOG(1) << "Deleting user profile " << user_local_state.value();
- if (!base::Delete(user_local_state, true)) {
+ if (!base::DeleteFile(user_local_state, true)) {
LOG(ERROR) << "Failed to delete user profile dir: "
<< user_local_state.value();
if (schedule_on_failure) {
@@ -500,7 +500,7 @@ bool MoveSetupOutOfInstallFolder(const InstallerState& installer_state,
// We cannot delete the file right away, but try to delete it some other
// way. Either with the help of a different process or the system.
- if (ret && !base::DeleteAfterReboot(temp_file)) {
+ if (ret && !base::DeleteFileAfterReboot(temp_file)) {
static const uint32 kDeleteAfterMs = 10 * 1000;
installer::DeleteFileFromTempProcess(temp_file, kDeleteAfterMs);
}
@@ -543,7 +543,7 @@ DeleteResult DeleteAppHostFilesAndFolders(const InstallerState& installer_state,
DeleteResult result = DELETE_SUCCEEDED;
base::FilePath app_host_exe(target_path.Append(installer::kChromeAppHostExe));
- if (!base::Delete(app_host_exe, false)) {
+ if (!base::DeleteFile(app_host_exe, false)) {
result = DELETE_FAILED;
LOG(ERROR) << "Failed to delete path: " << app_host_exe.value();
}
@@ -589,7 +589,7 @@ DeleteResult DeleteChromeFilesAndFolders(const InstallerState& installer_state,
}
VLOG(1) << "Deleting install path " << to_delete.value();
- if (!base::Delete(to_delete, true)) {
+ if (!base::DeleteFile(to_delete, true)) {
LOG(ERROR) << "Failed to delete path (1st try): " << to_delete.value();
if (installer_state.FindProduct(BrowserDistribution::CHROME_FRAME)) {
// We don't try killing Chrome processes for Chrome Frame builds since
@@ -605,7 +605,7 @@ DeleteResult DeleteChromeFilesAndFolders(const InstallerState& installer_state,
// Try closing any running Chrome processes and deleting files once
// again.
CloseAllChromeProcesses();
- if (!base::Delete(to_delete, true)) {
+ if (!base::DeleteFile(to_delete, true)) {
LOG(ERROR) << "Failed to delete path (2nd try): "
<< to_delete.value();
result = DELETE_FAILED;
@@ -1351,7 +1351,7 @@ InstallStatus UninstallProduct(const InstallationState& original_state,
// Try and delete the preserved local state once the post-install
// operations are complete.
if (!backup_state_file.empty())
- base::Delete(backup_state_file, false);
+ base::DeleteFile(backup_state_file, false);
return ret;
}
diff --git a/chrome/installer/test/alternate_version_generator.cc b/chrome/installer/test/alternate_version_generator.cc
index acc081b..c8cf3b2 100644
--- a/chrome/installer/test/alternate_version_generator.cc
+++ b/chrome/installer/test/alternate_version_generator.cc
@@ -75,7 +75,7 @@ class ScopedTempDirectory {
public:
ScopedTempDirectory() { }
~ScopedTempDirectory() {
- if (!directory_.empty() && !base::Delete(directory_, true)) {
+ if (!directory_.empty() && !base::DeleteFile(directory_, true)) {
LOG(DFATAL) << "Failed deleting temporary directory \""
<< directory_.value() << "\"";
}
@@ -602,9 +602,9 @@ bool GenerateAlternateVersion(const base::FilePath& original_installer_path,
// Get rid of intermediate files
base::FilePath chrome_7z(chrome_7z_name);
- if (!base::Delete(chrome_7z, false) ||
- !base::Delete(chrome_packed_7z, false) ||
- !base::Delete(setup_ex_, false)) {
+ if (!base::DeleteFile(chrome_7z, false) ||
+ !base::DeleteFile(chrome_packed_7z, false) ||
+ !base::DeleteFile(setup_ex_, false)) {
LOG(DFATAL) << "Failed deleting intermediate files";
return false;
}
diff --git a/chrome/installer/test/upgrade_test.cc b/chrome/installer/test/upgrade_test.cc
index 7c9f9bd..cca9359 100644
--- a/chrome/installer/test/upgrade_test.cc
+++ b/chrome/installer/test/upgrade_test.cc
@@ -32,7 +32,7 @@ class UpgradeTest : public testing::Test {
// Clean up by deleting the created newer version of mini_installer.exe.
static void TearDownTestCase() {
- EXPECT_TRUE(base::Delete(next_mini_installer_path_, false));
+ EXPECT_TRUE(base::DeleteFile(next_mini_installer_path_, false));
}
private:
static base::FilePath next_mini_installer_path_;
diff --git a/chrome/installer/tools/validate_installation_main.cc b/chrome/installer/tools/validate_installation_main.cc
index 1fd86de..8c5069fd 100644
--- a/chrome/installer/tools/validate_installation_main.cc
+++ b/chrome/installer/tools/validate_installation_main.cc
@@ -81,7 +81,7 @@ ConsoleLogHelper::~ConsoleLogHelper() {
// Delete the log file if it wasn't written to (this is expected).
int64 file_size = 0;
if (file_util::GetFileSize(log_file_path_, &file_size) && file_size == 0)
- base::Delete(log_file_path_, false);
+ base::DeleteFile(log_file_path_, false);
}
// Returns the path to the log file to create. The file should be empty at
diff --git a/chrome/installer/util/copy_tree_work_item.cc b/chrome/installer/util/copy_tree_work_item.cc
index 0e847b1..1ec3c8a 100644
--- a/chrome/installer/util/copy_tree_work_item.cc
+++ b/chrome/installer/util/copy_tree_work_item.cc
@@ -109,7 +109,7 @@ void CopyTreeWorkItem::Rollback() {
// If this does happen sometimes, we may consider using Move instead of
// Delete here. For now we just log the error and continue with the
// rest of rollback operation.
- if (copied_to_dest_path_ && !base::Delete(dest_path_, true)) {
+ if (copied_to_dest_path_ && !base::DeleteFile(dest_path_, true)) {
LOG(ERROR) << "Can not delete " << dest_path_.value();
}
if (moved_to_backup_) {
@@ -120,7 +120,7 @@ void CopyTreeWorkItem::Rollback() {
}
}
if (copied_to_alternate_path_ &&
- !base::Delete(alternative_path_, true)) {
+ !base::DeleteFile(alternative_path_, true)) {
LOG(ERROR) << "Can not delete " << alternative_path_.value();
}
}
diff --git a/chrome/installer/util/copy_tree_work_item_unittest.cc b/chrome/installer/util/copy_tree_work_item_unittest.cc
index c98e1f3..3b64832 100644
--- a/chrome/installer/util/copy_tree_work_item_unittest.cc
+++ b/chrome/installer/util/copy_tree_work_item_unittest.cc
@@ -562,7 +562,7 @@ TEST_F(CopyTreeWorkItemTest, DISABLED_IfNotPresentTest) {
EXPECT_FALSE(base::PathExists(backup_file));
// Now delete the destination and try copying the file again.
- base::Delete(file_name_to, true);
+ base::DeleteFile(file_name_to, true);
work_item.reset(WorkItem::CreateCopyTreeWorkItem(
file_name_from, file_name_to,
temp_dir_.path(), WorkItem::IF_NOT_PRESENT,
diff --git a/chrome/installer/util/delete_after_reboot_helper_unittest.cc b/chrome/installer/util/delete_after_reboot_helper_unittest.cc
index 02b52a7..7fb7360c 100644
--- a/chrome/installer/util/delete_after_reboot_helper_unittest.cc
+++ b/chrome/installer/util/delete_after_reboot_helper_unittest.cc
@@ -39,7 +39,7 @@ class DeleteAfterRebootHelperTest : public testing::Test {
}
virtual void TearDown() {
// Delete the temporary directory if it's still there.
- base::Delete(temp_dir_, true);
+ base::DeleteFile(temp_dir_, true);
// Try and restore the pending moves value, if we have one.
if (IsUserAnAdmin() && original_pending_moves_.size() > 1) {
@@ -228,7 +228,7 @@ TEST_F(DeleteAfterRebootHelperTest, TestFileDeleteSchedulingWithActualDeletes) {
}
// Delete the temporary directory.
- base::Delete(temp_dir_, true);
+ base::DeleteFile(temp_dir_, true);
// Test that we can remove the pending deletes.
EXPECT_TRUE(RemoveFromMovesPendingReboot(temp_dir_.value().c_str()));
diff --git a/chrome/installer/util/delete_tree_work_item.cc b/chrome/installer/util/delete_tree_work_item.cc
index 1bf69de..198a1d7 100644
--- a/chrome/installer/util/delete_tree_work_item.cc
+++ b/chrome/installer/util/delete_tree_work_item.cc
@@ -91,7 +91,7 @@ bool DeleteTreeWorkItem::Do() {
// We can safely delete the key files now.
for (ptrdiff_t i = 0; !abort && i != num_key_files_; ++i) {
base::FilePath& key_file = key_paths_[i];
- if (!base::Delete(key_file, true)) {
+ if (!base::DeleteFile(key_file, true)) {
// This should not really be possible because of the above.
PLOG(DFATAL) << "Unexpectedly could not delete " << key_file.value();
abort = true;
@@ -126,7 +126,7 @@ bool DeleteTreeWorkItem::Do() {
}
}
}
- if (!base::Delete(root_path_, true)) {
+ if (!base::DeleteFile(root_path_, true)) {
LOG(ERROR) << "can not delete " << root_path_.value();
return ignore_failure_;
}
diff --git a/chrome/installer/util/installer_state.cc b/chrome/installer/util/installer_state.cc
index ad8c053..32d9b5a 100644
--- a/chrome/installer/util/installer_state.cc
+++ b/chrome/installer/util/installer_state.cc
@@ -665,7 +665,7 @@ void InstallerState::RemoveOldVersionDirectories(
LOG(ERROR) << "Deleting old version directory: " << next_version.value();
// Attempt to recursively delete the old version dir.
- bool delete_succeeded = base::Delete(next_version, true);
+ bool delete_succeeded = base::DeleteFile(next_version, true);
// Note: temporarily log old version deletion at ERROR level to make it
// more likely we see this in the installer log.
diff --git a/chrome/installer/util/logging_installer.cc b/chrome/installer/util/logging_installer.cc
index 3116415..15b3d72 100644
--- a/chrome/installer/util/logging_installer.cc
+++ b/chrome/installer/util/logging_installer.cc
@@ -63,7 +63,7 @@ TruncateResult TruncateLogFileIfNeeded(const base::FilePath& log_file) {
result = LOGFILE_TRUNCATED;
}
}
- } else if (base::Delete(log_file, false)) {
+ } else if (base::DeleteFile(log_file, false)) {
// Couldn't get sufficient access to the log file, optimistically try to
// delete it.
result = LOGFILE_DELETED;
diff --git a/chrome/installer/util/master_preferences_unittest.cc b/chrome/installer/util/master_preferences_unittest.cc
index ec6e1cb..3525eff 100644
--- a/chrome/installer/util/master_preferences_unittest.cc
+++ b/chrome/installer/util/master_preferences_unittest.cc
@@ -23,7 +23,7 @@ class MasterPreferencesTest : public testing::Test {
}
virtual void TearDown() {
- EXPECT_TRUE(base::Delete(prefs_file_, false));
+ EXPECT_TRUE(base::DeleteFile(prefs_file_, false));
}
const base::FilePath& prefs_file() const { return prefs_file_; }
@@ -41,7 +41,7 @@ struct ExpectedBooleans {
} // namespace
TEST_F(MasterPreferencesTest, NoFileToParse) {
- EXPECT_TRUE(base::Delete(prefs_file(), false));
+ EXPECT_TRUE(base::DeleteFile(prefs_file(), false));
installer::MasterPreferences prefs(prefs_file());
EXPECT_FALSE(prefs.read_from_file());
}
@@ -275,7 +275,7 @@ TEST_F(MasterPreferencesTest, GetInstallPreferencesTest) {
}
// Delete temporary prefs file.
- EXPECT_TRUE(base::Delete(prefs_file, false));
+ EXPECT_TRUE(base::DeleteFile(prefs_file, false));
// Check that if master prefs doesn't exist, we can still parse the common
// prefs.
diff --git a/chrome/installer/util/self_cleaning_temp_dir.cc b/chrome/installer/util/self_cleaning_temp_dir.cc
index 8fddbb9..6426dd9 100644
--- a/chrome/installer/util/self_cleaning_temp_dir.cc
+++ b/chrome/installer/util/self_cleaning_temp_dir.cc
@@ -78,7 +78,7 @@ bool SelfCleaningTempDir::Delete() {
// First try to recursively delete the leaf directory managed by our
// base::ScopedTempDir.
- if (!base::Delete(path(), true)) {
+ if (!base::DeleteFile(path(), true)) {
// That failed, so schedule the temp dir and its contents for deletion after
// reboot.
LOG(WARNING) << "Failed to delete temporary directory " << path().value()
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index 1c2a0b1..94b7ec0 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -1200,7 +1200,7 @@ bool ShortcutOpUnpin(const base::FilePath& shortcut_path) {
}
bool ShortcutOpDelete(const base::FilePath& shortcut_path) {
- bool ret = base::Delete(shortcut_path, false);
+ bool ret = base::DeleteFile(shortcut_path, false);
LOG_IF(ERROR, !ret) << "Failed to remove " << shortcut_path.value();
return ret;
}
@@ -1269,7 +1269,7 @@ bool RemoveShortcutFolder(ShellUtil::ShortcutLocation location,
LOG(WARNING) << "Cannot find path at location " << location;
return false;
}
- if (!base::Delete(shortcut_folder, true)) {
+ if (!base::DeleteFile(shortcut_folder, true)) {
LOG(ERROR) << "Cannot remove folder " << shortcut_folder.value();
return false;
}
diff --git a/chrome/service/cloud_print/connector_settings_unittest.cc b/chrome/service/cloud_print/connector_settings_unittest.cc
index 8dcf59b..b7a4982 100644
--- a/chrome/service/cloud_print/connector_settings_unittest.cc
+++ b/chrome/service/cloud_print/connector_settings_unittest.cc
@@ -56,7 +56,7 @@ class ConnectorSettingsTest : public testing::Test {
ServiceProcessPrefs* CreateTestFile(const char* json) {
base::FilePath file_name = temp_dir_.path().AppendASCII("file.txt");
- base::Delete(file_name, false);
+ base::DeleteFile(file_name, false);
if (json) {
std::string content = json;
std::replace(content.begin(), content.end(), '\'', '"');
diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc
index 004e32bd..6b15184 100644
--- a/chrome/test/automation/proxy_launcher.cc
+++ b/chrome/test/automation/proxy_launcher.cc
@@ -559,7 +559,7 @@ bool NamedProxyLauncher::InitializeConnection(const LaunchState& state,
#if defined(OS_POSIX)
// Because we are waiting on the existence of the testing file below,
// make sure there isn't one already there before browser launch.
- if (!base::Delete(base::FilePath(channel_id_), false)) {
+ if (!base::DeleteFile(base::FilePath(channel_id_), false)) {
LOG(ERROR) << "Failed to delete " << channel_id_;
return false;
}
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 649d196..c2cc6fa 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -268,7 +268,7 @@ void TestingProfile::CreateTempProfileDir() {
base::FilePath fallback_dir(
system_tmp_dir.AppendASCII("TestingProfilePath"));
- base::Delete(fallback_dir, true);
+ base::DeleteFile(fallback_dir, true);
file_util::CreateDirectory(fallback_dir);
if (!temp_dir_.Set(fallback_dir)) {
// That shouldn't happen, but if it does, try to recover.
@@ -359,7 +359,7 @@ void TestingProfile::CreateHistoryService(bool delete_file, bool no_db) {
if (delete_file) {
base::FilePath path = GetPath();
path = path.Append(chrome::kHistoryFilename);
- base::Delete(path, false);
+ base::DeleteFile(path, false);
}
// This will create and init the history service.
HistoryService* history_service = static_cast<HistoryService*>(
@@ -428,7 +428,7 @@ static BrowserContextKeyedService* BuildBookmarkModel(
void TestingProfile::CreateBookmarkModel(bool delete_file) {
if (delete_file) {
base::FilePath path = GetPath().Append(chrome::kBookmarksFileName);
- base::Delete(path, false);
+ base::DeleteFile(path, false);
}
// This will create a bookmark model.
BookmarkModel* bookmark_service = static_cast<BookmarkModel*>(
diff --git a/chrome/test/logging/win/test_log_collector.cc b/chrome/test/logging/win/test_log_collector.cc
index 4324e26f..083c6b4 100644
--- a/chrome/test/logging/win/test_log_collector.cc
+++ b/chrome/test/logging/win/test_log_collector.cc
@@ -262,7 +262,7 @@ void TestLogCollector::ProcessSessionForTest(
std::cerr.flush();
}
- if (!base::Delete(log_file_, false))
+ if (!base::DeleteFile(log_file_, false))
LOG(ERROR) << "Failed to delete log file " << log_file_.value();
}
diff --git a/chrome/test/mini_installer_test/installer_test_util.cc b/chrome/test/mini_installer_test/installer_test_util.cc
index 8b32f6a..9496c88 100644
--- a/chrome/test/mini_installer_test/installer_test_util.cc
+++ b/chrome/test/mini_installer_test/installer_test_util.cc
@@ -62,7 +62,7 @@ bool DeleteInstallDirectory(bool system_level,
if (!has_install_dir || !base::PathExists(path))
return false;
path = path.AppendASCII(version);
- return base::Delete(path, true);
+ return base::DeleteFile(path, true);
}
bool DeleteRegistryKey(bool system_level,
diff --git a/chrome/test/mini_installer_test/run_all_unittests.cc b/chrome/test/mini_installer_test/run_all_unittests.cc
index 06a1c1d..a571a76 100644
--- a/chrome/test/mini_installer_test/run_all_unittests.cc
+++ b/chrome/test/mini_installer_test/run_all_unittests.cc
@@ -33,7 +33,7 @@ void BackUpProfile(bool chrome_frame) {
// Will check if User Data is already backed up.
// If yes, will delete and create new one.
if (base::PathExists(backup_path))
- base::Delete(backup_path, true);
+ base::DeleteFile(backup_path, true);
base::CopyDirectory(path, backup_path, true);
} else {
printf("Chrome is not installed. Will not take any backup\n");
diff --git a/chrome/test/perf/generate_profile.cc b/chrome/test/perf/generate_profile.cc
index 092d34d..fbee16f 100644
--- a/chrome/test/perf/generate_profile.cc
+++ b/chrome/test/perf/generate_profile.cc
@@ -256,7 +256,7 @@ bool GenerateProfile(GenerateProfileTypes types,
base::FilePath path = file_iterator.Next();
while (!path.empty()) {
base::FilePath dst_file = dst_dir.Append(path.BaseName());
- base::Delete(dst_file, false);
+ base::DeleteFile(dst_file, false);
if (!base::CopyFile(path, dst_file)) {
PLOG(ERROR) << "Copying file failed";
return false;
diff --git a/chrome/test/perf/memory_test.cc b/chrome/test/perf/memory_test.cc
index f3affd7..b4a1160 100644
--- a/chrome/test/perf/memory_test.cc
+++ b/chrome/test/perf/memory_test.cc
@@ -39,7 +39,7 @@ class MemoryTest : public UIPerfTest {
virtual ~MemoryTest() {
// Cleanup our temporary directory.
if (cleanup_temp_dir_on_exit_)
- base::Delete(temp_dir_, true);
+ base::DeleteFile(temp_dir_, true);
}
// Called from SetUp() to determine the user data dir to copy.
diff --git a/chrome/test/webdriver/webdriver_automation.cc b/chrome/test/webdriver/webdriver_automation.cc
index 1fa60ab..7ecff74 100644
--- a/chrome/test/webdriver/webdriver_automation.cc
+++ b/chrome/test/webdriver/webdriver_automation.cc
@@ -440,7 +440,7 @@ void Automation::Init(
#elif defined(OS_POSIX)
base::FilePath temp_file;
if (!file_util::CreateTemporaryFile(&temp_file) ||
- !base::Delete(temp_file, false /* recursive */)) {
+ !base::DeleteFile(temp_file, false /* recursive */)) {
*error = new Error(kUnknownError, "Could not create temporary filename");
return;
}
diff --git a/chrome/tools/convert_dict/convert_dict_unittest.cc b/chrome/tools/convert_dict/convert_dict_unittest.cc
index 91658d1..77f760d 100644
--- a/chrome/tools/convert_dict/convert_dict_unittest.cc
+++ b/chrome/tools/convert_dict/convert_dict_unittest.cc
@@ -130,8 +130,8 @@ void RunDictionaryTest(const char* codepage,
// Deletes the temporary files.
// We need to delete them after the above AffReader and DicReader are deleted
// since they close the input files in their destructors.
- base::Delete(aff_file, false);
- base::Delete(dic_file, false);
+ base::DeleteFile(aff_file, false);
+ base::DeleteFile(dic_file, false);
}
} // namespace
diff --git a/chrome/utility/media_galleries/pmp_test_helper.cc b/chrome/utility/media_galleries/pmp_test_helper.cc
index eb707be..edda31f 100644
--- a/chrome/utility/media_galleries/pmp_test_helper.cc
+++ b/chrome/utility/media_galleries/pmp_test_helper.cc
@@ -134,7 +134,7 @@ bool PmpTestHelper::InitColumnReaderFromBytes(
bool read_success = reader->ReadFile(platform_file, expected_type);
base::ClosePlatformFile(platform_file);
- base::Delete(temp_path, false /* recursive */);
+ base::DeleteFile(temp_path, false /* recursive */);
return read_success;
}