summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--base/debug/trace_event_win_unittest.cc2
-rw-r--r--base/file_util.h4
-rw-r--r--base/file_util_posix.cc6
-rw-r--r--base/file_util_unittest.cc54
-rw-r--r--base/file_util_win.cc8
-rw-r--r--base/files/file_path_watcher_browsertest.cc24
-rw-r--r--base/files/file_util_proxy.cc21
-rw-r--r--base/files/file_util_proxy.h15
-rw-r--r--base/files/file_util_proxy_unittest.cc2
-rw-r--r--base/files/important_file_writer.cc6
-rw-r--r--base/files/scoped_temp_dir.cc2
-rw-r--r--base/files/scoped_temp_dir_unittest.cc2
-rw-r--r--base/json/json_value_serializer_unittest.cc4
-rw-r--r--base/memory/shared_memory_posix.cc2
-rw-r--r--base/prefs/json_pref_store_unittest.cc2
-rw-r--r--base/test/test_file_util_posix.cc2
-rw-r--r--base/test/test_file_util_win.cc2
-rw-r--r--base/win/event_trace_consumer_unittest.cc4
-rw-r--r--base/win/event_trace_controller_unittest.cc4
-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
-rw-r--r--chrome_frame/crash_reporting/minidump_test.cc2
-rw-r--r--chrome_frame/test/chrome_frame_test_utils.cc2
-rw-r--r--chrome_frame/test/net/fake_external_tab.cc4
-rw-r--r--chrome_frame/test/perf/chrome_frame_perftest.cc2
-rw-r--r--chrome_frame/test/test_scrubber.cc2
-rw-r--r--chrome_frame/test/test_with_web_server.cc4
-rw-r--r--chromeos/dbus/cros_disks_client.cc2
-rw-r--r--chromeos/dbus/session_manager_client.cc2
-rw-r--r--cloud_print/common/win/install_utils.cc2
-rw-r--r--cloud_print/service/win/installer.cc8
-rw-r--r--cloud_print/service/win/service_listener.cc2
-rw-r--r--cloud_print/virtual_driver/win/install/setup.cc8
-rw-r--r--cloud_print/virtual_driver/win/port_monitor/port_monitor.cc4
-rw-r--r--cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc4
-rw-r--r--components/visitedlink/test/visitedlink_perftest.cc2
-rw-r--r--content/browser/download/base_file.cc2
-rw-r--r--content/browser/download/download_browsertest.cc2
-rw-r--r--content/browser/download/download_item_impl.cc2
-rw-r--r--content/browser/download/save_file_manager.cc8
-rw-r--r--content/browser/gpu/gpu_pixel_browsertest.cc4
-rw-r--r--content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc2
-rw-r--r--content/browser/indexed_db/indexed_db_context_impl.cc4
-rw-r--r--content/browser/net/sqlite_persistent_cookie_store.cc2
-rw-r--r--content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc2
-rw-r--r--content/browser/storage_partition_impl_map.cc6
-rw-r--r--content/browser/web_contents/navigation_controller_impl_unittest.cc2
-rw-r--r--content/browser/web_contents/web_contents_drag_win.cc4
-rw-r--r--content/common/sandbox_mac_diraccess_unittest.mm2
-rw-r--r--content/common/sandbox_mac_fontloading_unittest.mm2
-rw-r--r--ipc/ipc_channel_posix_unittest.cc2
-rw-r--r--net/base/file_stream_unittest.cc4
-rw-r--r--net/disk_cache/backend_unittest.cc4
-rw-r--r--net/disk_cache/cache_util_posix.cc2
-rw-r--r--net/disk_cache/entry_unittest.cc2
-rw-r--r--net/disk_cache/simple/simple_index_file.cc8
-rw-r--r--net/disk_cache/simple/simple_synchronous_entry.cc2
-rw-r--r--net/http/http_cache.cc2
-rw-r--r--net/http/http_network_transaction_unittest.cc6
-rw-r--r--net/proxy/proxy_config_service_linux_unittest.cc2
-rw-r--r--net/socket/unix_domain_socket_posix_unittest.cc2
-rw-r--r--net/url_request/url_fetcher_response_writer.cc2
-rw-r--r--net/url_request/url_request_unittest.cc6
-rw-r--r--printing/backend/cups_helper.cc4
-rw-r--r--printing/backend/print_backend_cups.cc4
-rw-r--r--remoting/host/config_file_watcher_unittest.cc2
-rw-r--r--remoting/host/pairing_registry_delegate_linux_unittest.cc2
-rw-r--r--sql/connection.cc6
-rw-r--r--sync/syncable/on_disk_directory_backing_store.cc2
-rw-r--r--sync/syncable/syncable_unittest.cc6
-rw-r--r--third_party/leveldatabase/env_chromium.cc4
-rw-r--r--webkit/browser/appcache/appcache_database.cc2
-rw-r--r--webkit/browser/appcache/appcache_storage_impl.cc2
-rw-r--r--webkit/browser/database/database_tracker.cc10
-rw-r--r--webkit/browser/database/vfs_backend.cc2
-rw-r--r--webkit/browser/dom_storage/session_storage_database.cc2
-rw-r--r--webkit/browser/fileapi/file_system_usage_cache.cc2
-rw-r--r--webkit/browser/fileapi/native_file_util.cc4
-rw-r--r--webkit/browser/fileapi/obfuscated_file_util.cc12
-rw-r--r--webkit/browser/fileapi/obfuscated_file_util_unittest.cc4
-rw-r--r--webkit/browser/fileapi/sandbox_database_test_helper.cc2
-rw-r--r--webkit/browser/fileapi/sandbox_directory_database.cc4
-rw-r--r--webkit/browser/fileapi/sandbox_directory_database_unittest.cc6
-rw-r--r--webkit/browser/fileapi/sandbox_isolated_origin_database.cc2
-rw-r--r--webkit/browser/fileapi/sandbox_origin_database.cc6
-rw-r--r--webkit/common/blob/scoped_file.cc8
-rw-r--r--webkit/plugins/npapi/plugin_instance.cc2
-rw-r--r--webkit/plugins/npapi/plugin_stream_posix.cc2
201 files changed, 435 insertions, 453 deletions
diff --git a/base/debug/trace_event_win_unittest.cc b/base/debug/trace_event_win_unittest.cc
index d84fea0..531c5f7 100644
--- a/base/debug/trace_event_win_unittest.cc
+++ b/base/debug/trace_event_win_unittest.cc
@@ -157,7 +157,7 @@ class TraceEventWinTest: public testing::Test {
EXPECT_HRESULT_SUCCEEDED(controller_.Stop(&prop));
if (!log_file_.value().empty())
- base::Delete(log_file_, false);
+ base::DeleteFile(log_file_, false);
// We want our singleton torn down after each test.
TraceLog::DeleteForTesting();
diff --git a/base/file_util.h b/base/file_util.h
index e6d7ac8..ed2f3ca 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -69,7 +69,7 @@ BASE_EXPORT int64 ComputeDirectorySize(const FilePath& root_path);
//
// WARNING: USING THIS WITH recursive==true IS EQUIVALENT
// TO "rm -rf", SO USE WITH CAUTION.
-BASE_EXPORT bool Delete(const FilePath& path, bool recursive);
+BASE_EXPORT bool DeleteFile(const FilePath& path, bool recursive);
#if defined(OS_WIN)
// Schedules to delete the given path, whether it's a file or a directory, until
@@ -77,7 +77,7 @@ BASE_EXPORT bool Delete(const FilePath& path, bool recursive);
// Note:
// 1) The file/directory to be deleted should exist in a temp folder.
// 2) The directory to be deleted must be empty.
-BASE_EXPORT bool DeleteAfterReboot(const FilePath& path);
+BASE_EXPORT bool DeleteFileAfterReboot(const FilePath& path);
#endif
// Moves the given path, whether it's a file or a directory.
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
index c368534..762700a 100644
--- a/base/file_util_posix.cc
+++ b/base/file_util_posix.cc
@@ -160,7 +160,7 @@ FilePath MakeAbsoluteFilePath(const FilePath& input) {
// which works both with and without the recursive flag. I'm not sure we need
// that functionality. If not, remove from file_util_win.cc, otherwise add it
// here.
-bool Delete(const FilePath& path, bool recursive) {
+bool DeleteFile(const FilePath& path, bool recursive) {
ThreadRestrictions::AssertIOAllowed();
const char* path_str = path.value().c_str();
stat_wrapper_t file_info;
@@ -735,7 +735,7 @@ bool DetermineDevShmExecutable() {
int fd = CreateAndOpenFdForTemporaryFile(FilePath("/dev/shm"), &path);
if (fd >= 0) {
ScopedFD shm_fd_closer(&fd);
- Delete(path, false);
+ DeleteFile(path, false);
long sysconf_result = sysconf(_SC_PAGESIZE);
CHECK_GE(sysconf_result, 0);
size_t pagesize = static_cast<size_t>(sysconf_result);
@@ -900,7 +900,7 @@ bool MoveUnsafe(const FilePath& from_path, const FilePath& to_path) {
if (!CopyDirectory(from_path, to_path, true))
return false;
- Delete(from_path, true);
+ DeleteFile(from_path, true);
return true;
}
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc
index e0007d5..e523920 100644
--- a/base/file_util_unittest.cc
+++ b/base/file_util_unittest.cc
@@ -738,9 +738,9 @@ TEST_F(FileUtilTest, DeleteNonExistent) {
FilePath non_existent = temp_dir_.path().AppendASCII("bogus_file_dne.foobar");
ASSERT_FALSE(base::PathExists(non_existent));
- EXPECT_TRUE(base::Delete(non_existent, false));
+ EXPECT_TRUE(base::DeleteFile(non_existent, false));
ASSERT_FALSE(base::PathExists(non_existent));
- EXPECT_TRUE(base::Delete(non_existent, true));
+ EXPECT_TRUE(base::DeleteFile(non_existent, true));
ASSERT_FALSE(base::PathExists(non_existent));
}
@@ -751,7 +751,7 @@ TEST_F(FileUtilTest, DeleteFile) {
ASSERT_TRUE(base::PathExists(file_name));
// Make sure it's deleted
- EXPECT_TRUE(base::Delete(file_name, false));
+ EXPECT_TRUE(base::DeleteFile(file_name, false));
EXPECT_FALSE(base::PathExists(file_name));
// Test recursive case, create a new file
@@ -760,7 +760,7 @@ TEST_F(FileUtilTest, DeleteFile) {
ASSERT_TRUE(base::PathExists(file_name));
// Make sure it's deleted
- EXPECT_TRUE(base::Delete(file_name, true));
+ EXPECT_TRUE(base::DeleteFile(file_name, true));
EXPECT_FALSE(base::PathExists(file_name));
}
@@ -777,7 +777,7 @@ TEST_F(FileUtilTest, DeleteSymlinkToExistentFile) {
<< "Failed to create symlink.";
// Delete the symbolic link.
- EXPECT_TRUE(base::Delete(file_link, false));
+ EXPECT_TRUE(base::DeleteFile(file_link, false));
// Make sure original file is not deleted.
EXPECT_FALSE(base::PathExists(file_link));
@@ -799,7 +799,7 @@ TEST_F(FileUtilTest, DeleteSymlinkToNonExistentFile) {
EXPECT_FALSE(base::PathExists(file_link));
// Delete the symbolic link.
- EXPECT_TRUE(base::Delete(file_link, false));
+ EXPECT_TRUE(base::DeleteFile(file_link, false));
// Make sure the symbolic link is deleted.
EXPECT_FALSE(file_util::IsLink(file_link));
@@ -843,7 +843,7 @@ TEST_F(FileUtilTest, ChangeFilePermissionsAndRead) {
file_util::ReadFile(file_name, buffer, buffer_size));
// Delete the file.
- EXPECT_TRUE(base::Delete(file_name, false));
+ EXPECT_TRUE(base::DeleteFile(file_name, false));
EXPECT_FALSE(base::PathExists(file_name));
delete[] buffer;
@@ -888,7 +888,7 @@ TEST_F(FileUtilTest, ChangeFilePermissionsAndWrite) {
EXPECT_TRUE(PathIsWritable(file_name));
// Delete the file.
- EXPECT_TRUE(base::Delete(file_name, false));
+ EXPECT_TRUE(base::DeleteFile(file_name, false));
EXPECT_FALSE(base::PathExists(file_name));
}
@@ -940,7 +940,7 @@ TEST_F(FileUtilTest, ChangeDirectoryPermissionsAndEnumerate) {
EXPECT_EQ(c2.size(), 1);
// Delete the file.
- EXPECT_TRUE(base::Delete(subdir_path, true));
+ EXPECT_TRUE(base::DeleteFile(subdir_path, true));
EXPECT_FALSE(base::PathExists(subdir_path));
}
@@ -965,12 +965,12 @@ TEST_F(FileUtilTest, DeleteWildCard) {
directory_contents = directory_contents.Append(FPL("*"));
// Delete non-recursively and check that only the file is deleted
- EXPECT_TRUE(base::Delete(directory_contents, false));
+ EXPECT_TRUE(base::DeleteFile(directory_contents, false));
EXPECT_FALSE(base::PathExists(file_name));
EXPECT_TRUE(base::PathExists(subdir_path));
// Delete recursively and make sure all contents are deleted
- EXPECT_TRUE(base::Delete(directory_contents, true));
+ EXPECT_TRUE(base::DeleteFile(directory_contents, true));
EXPECT_FALSE(base::PathExists(file_name));
EXPECT_FALSE(base::PathExists(subdir_path));
}
@@ -988,11 +988,11 @@ TEST_F(FileUtilTest, DeleteNonExistantWildCard) {
directory_contents = directory_contents.Append(FPL("*"));
// Delete non-recursively and check nothing got deleted
- EXPECT_TRUE(base::Delete(directory_contents, false));
+ EXPECT_TRUE(base::DeleteFile(directory_contents, false));
EXPECT_TRUE(base::PathExists(subdir_path));
// Delete recursively and check nothing got deleted
- EXPECT_TRUE(base::Delete(directory_contents, true));
+ EXPECT_TRUE(base::DeleteFile(directory_contents, true));
EXPECT_TRUE(base::PathExists(subdir_path));
}
#endif
@@ -1017,11 +1017,11 @@ TEST_F(FileUtilTest, DeleteDirNonRecursive) {
ASSERT_TRUE(base::PathExists(subdir_path2));
// Delete non-recursively and check that the empty dir got deleted
- EXPECT_TRUE(base::Delete(subdir_path2, false));
+ EXPECT_TRUE(base::DeleteFile(subdir_path2, false));
EXPECT_FALSE(base::PathExists(subdir_path2));
// Delete non-recursively and check that nothing got deleted
- EXPECT_FALSE(base::Delete(test_subdir, false));
+ EXPECT_FALSE(base::DeleteFile(test_subdir, false));
EXPECT_TRUE(base::PathExists(test_subdir));
EXPECT_TRUE(base::PathExists(file_name));
EXPECT_TRUE(base::PathExists(subdir_path1));
@@ -1047,11 +1047,11 @@ TEST_F(FileUtilTest, DeleteDirRecursive) {
ASSERT_TRUE(base::PathExists(subdir_path2));
// Delete recursively and check that the empty dir got deleted
- EXPECT_TRUE(base::Delete(subdir_path2, true));
+ EXPECT_TRUE(base::DeleteFile(subdir_path2, true));
EXPECT_FALSE(base::PathExists(subdir_path2));
// Delete recursively and check that everything got deleted
- EXPECT_TRUE(base::Delete(test_subdir, true));
+ EXPECT_TRUE(base::DeleteFile(test_subdir, true));
EXPECT_FALSE(base::PathExists(file_name));
EXPECT_FALSE(base::PathExists(subdir_path1));
EXPECT_FALSE(base::PathExists(test_subdir));
@@ -1692,7 +1692,7 @@ TEST_F(FileUtilTest, CreateTemporaryFileTest) {
for (int i = 0; i < 3; i++)
EXPECT_FALSE(temp_files[i] == temp_files[(i+1)%3]);
for (int i = 0; i < 3; i++)
- EXPECT_TRUE(base::Delete(temp_files[i], false));
+ EXPECT_TRUE(base::DeleteFile(temp_files[i], false));
}
TEST_F(FileUtilTest, CreateAndOpenTemporaryFileTest) {
@@ -1715,7 +1715,7 @@ TEST_F(FileUtilTest, CreateAndOpenTemporaryFileTest) {
// Close and delete.
for (i = 0; i < 3; ++i) {
EXPECT_TRUE(file_util::CloseFile(fps[i]));
- EXPECT_TRUE(base::Delete(names[i], false));
+ EXPECT_TRUE(base::DeleteFile(names[i], false));
}
}
@@ -1724,7 +1724,7 @@ TEST_F(FileUtilTest, CreateNewTempDirectoryTest) {
ASSERT_TRUE(file_util::CreateNewTempDirectory(FilePath::StringType(),
&temp_dir));
EXPECT_TRUE(base::PathExists(temp_dir));
- EXPECT_TRUE(base::Delete(temp_dir, false));
+ EXPECT_TRUE(base::DeleteFile(temp_dir, false));
}
TEST_F(FileUtilTest, CreateNewTemporaryDirInDirTest) {
@@ -1735,7 +1735,7 @@ TEST_F(FileUtilTest, CreateNewTemporaryDirInDirTest) {
&new_dir));
EXPECT_TRUE(base::PathExists(new_dir));
EXPECT_TRUE(temp_dir_.path().IsParent(new_dir));
- EXPECT_TRUE(base::Delete(new_dir, false));
+ EXPECT_TRUE(base::DeleteFile(new_dir, false));
}
TEST_F(FileUtilTest, GetShmemTempDirTest) {
@@ -1768,7 +1768,7 @@ TEST_F(FileUtilTest, CreateDirectoryTest) {
EXPECT_TRUE(base::PathExists(test_path));
EXPECT_FALSE(file_util::CreateDirectory(test_path));
- EXPECT_TRUE(base::Delete(test_root, true));
+ EXPECT_TRUE(base::DeleteFile(test_root, true));
EXPECT_FALSE(base::PathExists(test_root));
EXPECT_FALSE(base::PathExists(test_path));
@@ -1813,9 +1813,9 @@ TEST_F(FileUtilTest, DetectDirectoryTest) {
CreateTextFile(test_path, L"test file");
EXPECT_TRUE(base::PathExists(test_path));
EXPECT_FALSE(DirectoryExists(test_path));
- EXPECT_TRUE(base::Delete(test_path, false));
+ EXPECT_TRUE(base::DeleteFile(test_path, false));
- EXPECT_TRUE(base::Delete(test_root, true));
+ EXPECT_TRUE(base::DeleteFile(test_root, true));
}
TEST_F(FileUtilTest, FileEnumeratorTest) {
@@ -1933,13 +1933,13 @@ TEST_F(FileUtilTest, AppendToFile) {
// Create a fresh, empty copy of this directory.
if (base::PathExists(data_dir)) {
- ASSERT_TRUE(base::Delete(data_dir, true));
+ ASSERT_TRUE(base::DeleteFile(data_dir, true));
}
ASSERT_TRUE(file_util::CreateDirectory(data_dir));
// Create a fresh, empty copy of this directory.
if (base::PathExists(data_dir)) {
- ASSERT_TRUE(base::Delete(data_dir, true));
+ ASSERT_TRUE(base::DeleteFile(data_dir, true));
}
ASSERT_TRUE(file_util::CreateDirectory(data_dir));
FilePath foobar(data_dir.Append(FILE_PATH_LITERAL("foobar.txt")));
@@ -1961,7 +1961,7 @@ TEST_F(FileUtilTest, TouchFile) {
// Create a fresh, empty copy of this directory.
if (base::PathExists(data_dir)) {
- ASSERT_TRUE(base::Delete(data_dir, true));
+ ASSERT_TRUE(base::DeleteFile(data_dir, true));
}
ASSERT_TRUE(file_util::CreateDirectory(data_dir));
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index 95843d9..c29e2e0 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -82,7 +82,7 @@ FilePath MakeAbsoluteFilePath(const FilePath& input) {
return FilePath(file_path);
}
-bool Delete(const FilePath& path, bool recursive) {
+bool DeleteFile(const FilePath& path, bool recursive) {
ThreadRestrictions::AssertIOAllowed();
if (path.value().length() >= MAX_PATH)
@@ -98,7 +98,7 @@ bool Delete(const FilePath& path, bool recursive) {
// Otherwise, it's a file, wildcard or non-existant. Try DeleteFile first
// because it should be faster. If DeleteFile fails, then we fall through
// to SHFileOperation, which will do the right thing.
- if (DeleteFile(path.value().c_str()) != 0)
+ if (::DeleteFile(path.value().c_str()) != 0)
return true;
}
@@ -136,7 +136,7 @@ bool Delete(const FilePath& path, bool recursive) {
return (err == 0 || err == ERROR_FILE_NOT_FOUND || err == 0x402);
}
-bool DeleteAfterReboot(const FilePath& path) {
+bool DeleteFileAfterReboot(const FilePath& path) {
ThreadRestrictions::AssertIOAllowed();
if (path.value().length() >= MAX_PATH)
@@ -744,7 +744,7 @@ bool CopyAndDeleteDirectory(const FilePath& from_path,
const FilePath& to_path) {
ThreadRestrictions::AssertIOAllowed();
if (CopyDirectory(from_path, to_path, true)) {
- if (Delete(from_path, true))
+ if (DeleteFile(from_path, true))
return true;
// Like Move, this function is not transactional, so we just
diff --git a/base/files/file_path_watcher_browsertest.cc b/base/files/file_path_watcher_browsertest.cc
index 7820182..da95909 100644
--- a/base/files/file_path_watcher_browsertest.cc
+++ b/base/files/file_path_watcher_browsertest.cc
@@ -274,7 +274,7 @@ TEST_F(FilePathWatcherTest, DeletedFile) {
ASSERT_TRUE(SetupWatch(test_file(), &watcher, delegate.get(), false));
// Now make sure we get notified if the file is deleted.
- base::Delete(test_file(), false);
+ base::DeleteFile(test_file(), false);
ASSERT_TRUE(WaitForEvents());
DeleteDelegateOnFileThread(delegate.release());
}
@@ -363,7 +363,7 @@ TEST_F(FilePathWatcherTest, NonExistentDirectory) {
VLOG(1) << "Waiting for file change";
ASSERT_TRUE(WaitForEvents());
- ASSERT_TRUE(base::Delete(file, false));
+ ASSERT_TRUE(base::DeleteFile(file, false));
VLOG(1) << "Waiting for file deletion";
ASSERT_TRUE(WaitForEvents());
DeleteDelegateOnFileThread(delegate.release());
@@ -415,7 +415,7 @@ TEST_F(FilePathWatcherTest, DisappearingDirectory) {
scoped_ptr<TestDelegate> delegate(new TestDelegate(collector()));
ASSERT_TRUE(SetupWatch(file, &watcher, delegate.get(), false));
- ASSERT_TRUE(base::Delete(dir, true));
+ ASSERT_TRUE(base::DeleteFile(dir, true));
ASSERT_TRUE(WaitForEvents());
DeleteDelegateOnFileThread(delegate.release());
}
@@ -427,7 +427,7 @@ TEST_F(FilePathWatcherTest, DeleteAndRecreate) {
scoped_ptr<TestDelegate> delegate(new TestDelegate(collector()));
ASSERT_TRUE(SetupWatch(test_file(), &watcher, delegate.get(), false));
- ASSERT_TRUE(base::Delete(test_file(), false));
+ ASSERT_TRUE(base::DeleteFile(test_file(), false));
VLOG(1) << "Waiting for file deletion";
ASSERT_TRUE(WaitForEvents());
@@ -460,7 +460,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) {
ASSERT_TRUE(WaitForEvents());
#endif // !OS_MACOSX
- ASSERT_TRUE(base::Delete(file1, false));
+ ASSERT_TRUE(base::DeleteFile(file1, false));
VLOG(1) << "Waiting for file1 deletion";
ASSERT_TRUE(WaitForEvents());
@@ -542,11 +542,11 @@ TEST_F(FilePathWatcherTest, RecursiveWatch) {
ASSERT_TRUE(WaitForEvents());
// Delete "$dir/subdir/subdir_file1".
- ASSERT_TRUE(base::Delete(subdir_file1, false));
+ ASSERT_TRUE(base::DeleteFile(subdir_file1, false));
ASSERT_TRUE(WaitForEvents());
// Delete "$dir/subdir/subdir_child_dir/child_dir_file1".
- ASSERT_TRUE(base::Delete(child_dir_file1, false));
+ ASSERT_TRUE(base::DeleteFile(child_dir_file1, false));
ASSERT_TRUE(WaitForEvents());
DeleteDelegateOnFileThread(delegate.release());
}
@@ -634,7 +634,7 @@ TEST_F(FilePathWatcherTest, DeleteLink) {
ASSERT_TRUE(SetupWatch(test_link(), &watcher, delegate.get(), false));
// Now make sure we get notified if the link is deleted.
- ASSERT_TRUE(base::Delete(test_link(), false));
+ ASSERT_TRUE(base::DeleteFile(test_link(), false));
ASSERT_TRUE(WaitForEvents());
DeleteDelegateOnFileThread(delegate.release());
}
@@ -681,7 +681,7 @@ TEST_F(FilePathWatcherTest, DeleteTargetLinkedFile) {
ASSERT_TRUE(SetupWatch(test_link(), &watcher, delegate.get(), false));
// Now make sure we get notified if the target file is deleted.
- ASSERT_TRUE(base::Delete(test_file(), false));
+ ASSERT_TRUE(base::DeleteFile(test_file(), false));
ASSERT_TRUE(WaitForEvents());
DeleteDelegateOnFileThread(delegate.release());
}
@@ -709,7 +709,7 @@ TEST_F(FilePathWatcherTest, LinkedDirectoryPart1) {
VLOG(1) << "Waiting for file change";
ASSERT_TRUE(WaitForEvents());
- ASSERT_TRUE(base::Delete(file, false));
+ ASSERT_TRUE(base::DeleteFile(file, false));
VLOG(1) << "Waiting for file deletion";
ASSERT_TRUE(WaitForEvents());
DeleteDelegateOnFileThread(delegate.release());
@@ -739,7 +739,7 @@ TEST_F(FilePathWatcherTest, LinkedDirectoryPart2) {
VLOG(1) << "Waiting for file change";
ASSERT_TRUE(WaitForEvents());
- ASSERT_TRUE(base::Delete(file, false));
+ ASSERT_TRUE(base::DeleteFile(file, false));
VLOG(1) << "Waiting for file deletion";
ASSERT_TRUE(WaitForEvents());
DeleteDelegateOnFileThread(delegate.release());
@@ -767,7 +767,7 @@ TEST_F(FilePathWatcherTest, LinkedDirectoryPart3) {
VLOG(1) << "Waiting for file change";
ASSERT_TRUE(WaitForEvents());
- ASSERT_TRUE(base::Delete(file, false));
+ ASSERT_TRUE(base::DeleteFile(file, false));
VLOG(1) << "Waiting for file deletion";
ASSERT_TRUE(WaitForEvents());
DeleteDelegateOnFileThread(delegate.release());
diff --git a/base/files/file_util_proxy.cc b/base/files/file_util_proxy.cc
index fee97fb..2075975 100644
--- a/base/files/file_util_proxy.cc
+++ b/base/files/file_util_proxy.cc
@@ -219,7 +219,7 @@ PlatformFileError DeleteAdapter(const FilePath& file_path, bool recursive) {
if (!PathExists(file_path)) {
return PLATFORM_FILE_ERROR_NOT_FOUND;
}
- if (!base::Delete(file_path, recursive)) {
+ if (!base::DeleteFile(file_path, recursive)) {
if (!recursive && !file_util::IsDirectoryEmpty(file_path)) {
return PLATFORM_FILE_ERROR_NOT_EMPTY;
}
@@ -300,26 +300,15 @@ bool FileUtilProxy::GetFileInfoFromPlatformFile(
#if !defined(OS_NACL)
// static
-bool FileUtilProxy::Delete(TaskRunner* task_runner,
- const FilePath& file_path,
- bool recursive,
- const StatusCallback& callback) {
+bool FileUtilProxy::DeleteFile(TaskRunner* task_runner,
+ const FilePath& file_path,
+ bool recursive,
+ const StatusCallback& callback) {
return base::PostTaskAndReplyWithResult(
task_runner, FROM_HERE,
Bind(&DeleteAdapter, file_path, recursive),
callback);
}
-
-// static
-bool FileUtilProxy::RecursiveDelete(
- TaskRunner* task_runner,
- const FilePath& file_path,
- const StatusCallback& callback) {
- return base::PostTaskAndReplyWithResult(
- task_runner, FROM_HERE,
- Bind(&DeleteAdapter, file_path, true /* recursive */),
- callback);
-}
#endif // !defined(OS_NACL)
// static
diff --git a/base/files/file_util_proxy.h b/base/files/file_util_proxy.h
index 56d1f77..bded161 100644
--- a/base/files/file_util_proxy.h
+++ b/base/files/file_util_proxy.h
@@ -96,17 +96,10 @@ class BASE_EXPORT FileUtilProxy {
// Deletes a file or a directory.
// It is an error to delete a non-empty directory with recursive=false.
// This returns false if task posting to |task_runner| has failed.
- static bool Delete(TaskRunner* task_runner,
- const FilePath& file_path,
- bool recursive,
- const StatusCallback& callback);
-
- // Deletes a directory and all of its contents.
- // This returns false if task posting to |task_runner| has failed.
- static bool RecursiveDelete(
- TaskRunner* task_runner,
- const FilePath& file_path,
- const StatusCallback& callback);
+ static bool DeleteFile(TaskRunner* task_runner,
+ const FilePath& file_path,
+ bool recursive,
+ const StatusCallback& callback);
// Reads from a file. On success, the file pointer is moved to position
// |offset + bytes_to_read| in the file. The callback can be null.
diff --git a/base/files/file_util_proxy_unittest.cc b/base/files/file_util_proxy_unittest.cc
index e8680bb..a454c57 100644
--- a/base/files/file_util_proxy_unittest.cc
+++ b/base/files/file_util_proxy_unittest.cc
@@ -219,7 +219,7 @@ TEST_F(FileUtilProxyTest, CreateTemporary) {
EXPECT_EQ("test", data);
// Make sure we can & do delete the created file to prevent leaks on the bots.
- EXPECT_TRUE(base::Delete(path_, false));
+ EXPECT_TRUE(base::DeleteFile(path_, false));
}
TEST_F(FileUtilProxyTest, GetFileInfo_File) {
diff --git a/base/files/important_file_writer.cc b/base/files/important_file_writer.cc
index b3564ef..d884985 100644
--- a/base/files/important_file_writer.cc
+++ b/base/files/important_file_writer.cc
@@ -73,20 +73,20 @@ bool ImportantFileWriter::WriteFileAtomically(const FilePath& path,
if (!ClosePlatformFile(tmp_file)) {
LogFailure(path, FAILED_CLOSING, "failed to close temporary file");
- base::Delete(tmp_file_path, false);
+ base::DeleteFile(tmp_file_path, false);
return false;
}
if (bytes_written < static_cast<int>(data.length())) {
LogFailure(path, FAILED_WRITING, "error writing, bytes_written=" +
IntToString(bytes_written));
- base::Delete(tmp_file_path, false);
+ base::DeleteFile(tmp_file_path, false);
return false;
}
if (!base::ReplaceFile(tmp_file_path, path, NULL)) {
LogFailure(path, FAILED_RENAMING, "could not rename temporary file");
- base::Delete(tmp_file_path, false);
+ base::DeleteFile(tmp_file_path, false);
return false;
}
diff --git a/base/files/scoped_temp_dir.cc b/base/files/scoped_temp_dir.cc
index 3e90349..497799e 100644
--- a/base/files/scoped_temp_dir.cc
+++ b/base/files/scoped_temp_dir.cc
@@ -63,7 +63,7 @@ bool ScopedTempDir::Delete() {
if (path_.empty())
return false;
- bool ret = base::Delete(path_, true);
+ bool ret = base::DeleteFile(path_, true);
if (ret) {
// We only clear the path if deleted the directory.
path_.clear();
diff --git a/base/files/scoped_temp_dir_unittest.cc b/base/files/scoped_temp_dir_unittest.cc
index 75afa61..0c9131c 100644
--- a/base/files/scoped_temp_dir_unittest.cc
+++ b/base/files/scoped_temp_dir_unittest.cc
@@ -77,7 +77,7 @@ TEST(ScopedTempDir, UniqueTempDirUnderPath) {
EXPECT_TRUE(test_path.value().find(base_path.value()) != std::string::npos);
}
EXPECT_FALSE(DirectoryExists(test_path));
- base::Delete(base_path, true);
+ base::DeleteFile(base_path, true);
}
TEST(ScopedTempDir, MultipleInvocations) {
diff --git a/base/json/json_value_serializer_unittest.cc b/base/json/json_value_serializer_unittest.cc
index 519af84..314cd07 100644
--- a/base/json/json_value_serializer_unittest.cc
+++ b/base/json/json_value_serializer_unittest.cc
@@ -424,7 +424,7 @@ TEST_F(JSONFileValueSerializerTest, Roundtrip) {
// Now compare file contents.
EXPECT_TRUE(TextContentsEqual(original_file_path, written_file_path));
- EXPECT_TRUE(base::Delete(written_file_path, false));
+ EXPECT_TRUE(base::DeleteFile(written_file_path, false));
}
TEST_F(JSONFileValueSerializerTest, RoundtripNested) {
@@ -451,7 +451,7 @@ TEST_F(JSONFileValueSerializerTest, RoundtripNested) {
// Now compare file contents.
EXPECT_TRUE(TextContentsEqual(original_file_path, written_file_path));
- EXPECT_TRUE(base::Delete(written_file_path, false));
+ EXPECT_TRUE(base::DeleteFile(written_file_path, false));
}
TEST_F(JSONFileValueSerializerTest, NoWhitespace) {
diff --git a/base/memory/shared_memory_posix.cc b/base/memory/shared_memory_posix.cc
index 93e0b76..a52e73a 100644
--- a/base/memory/shared_memory_posix.cc
+++ b/base/memory/shared_memory_posix.cc
@@ -237,7 +237,7 @@ bool SharedMemory::Delete(const std::string& name) {
return false;
if (PathExists(path))
- return base::Delete(path, false);
+ return base::DeleteFile(path, false);
// Doesn't exist, so success.
return true;
diff --git a/base/prefs/json_pref_store_unittest.cc b/base/prefs/json_pref_store_unittest.cc
index dcfea71..34e1b8a 100644
--- a/base/prefs/json_pref_store_unittest.cc
+++ b/base/prefs/json_pref_store_unittest.cc
@@ -147,7 +147,7 @@ void RunBasicJsonPrefStoreTest(JsonPrefStore* pref_store,
pref_store->CommitPendingWrite();
RunLoop().RunUntilIdle();
EXPECT_TRUE(TextContentsEqual(golden_output_file, output_file));
- ASSERT_TRUE(base::Delete(output_file, false));
+ ASSERT_TRUE(base::DeleteFile(output_file, false));
}
TEST_F(JsonPrefStoreTest, Basic) {
diff --git a/base/test/test_file_util_posix.cc b/base/test/test_file_util_posix.cc
index 10701be..3e1b9eb 100644
--- a/base/test/test_file_util_posix.cc
+++ b/base/test/test_file_util_posix.cc
@@ -77,7 +77,7 @@ bool RestorePermissionInfo(const base::FilePath& path,
bool DieFileDie(const base::FilePath& file, bool recurse) {
// There is no need to workaround Windows problems on POSIX.
// Just pass-through.
- return base::Delete(file, recurse);
+ return base::DeleteFile(file, recurse);
}
#if !defined(OS_LINUX) && !defined(OS_MACOSX)
diff --git a/base/test/test_file_util_win.cc b/base/test/test_file_util_win.cc
index 3cfd233..2a5a4d0 100644
--- a/base/test/test_file_util_win.cc
+++ b/base/test/test_file_util_win.cc
@@ -126,7 +126,7 @@ bool DieFileDie(const base::FilePath& file, bool recurse) {
// into short chunks, so that if a try succeeds, we won't delay the test
// for too long.
for (int i = 0; i < kIterations; ++i) {
- if (base::Delete(file, recurse))
+ if (base::DeleteFile(file, recurse))
return true;
base::PlatformThread::Sleep(kTimeout);
}
diff --git a/base/win/event_trace_consumer_unittest.cc b/base/win/event_trace_consumer_unittest.cc
index b92bdc0..ce5262e 100644
--- a/base/win/event_trace_consumer_unittest.cc
+++ b/base/win/event_trace_consumer_unittest.cc
@@ -291,7 +291,7 @@ class EtwTraceConsumerDataTest: public EtwTraceConsumerBaseTest {
}
virtual void TearDown() {
- EXPECT_TRUE(base::Delete(temp_file_, false));
+ EXPECT_TRUE(base::DeleteFile(temp_file_, false));
EtwTraceConsumerBaseTest::TearDown();
}
@@ -335,7 +335,7 @@ class EtwTraceConsumerDataTest: public EtwTraceConsumerBaseTest {
}
HRESULT RoundTripEvent(PEVENT_TRACE_HEADER header, PEVENT_TRACE* trace) {
- base::Delete(temp_file_, false);
+ base::DeleteFile(temp_file_, false);
HRESULT hr = LogEventToTempSession(header);
if (SUCCEEDED(hr))
diff --git a/base/win/event_trace_controller_unittest.cc b/base/win/event_trace_controller_unittest.cc
index 4fe32c3..079a04b 100644
--- a/base/win/event_trace_controller_unittest.cc
+++ b/base/win/event_trace_controller_unittest.cc
@@ -171,7 +171,7 @@ TEST_F(EtwTraceControllerTest, StartFileSession) {
temp.value().c_str());
if (hr == E_ACCESSDENIED) {
VLOG(1) << "You must be an administrator to run this test on Vista";
- base::Delete(temp, false);
+ base::DeleteFile(temp, false);
return;
}
@@ -181,7 +181,7 @@ TEST_F(EtwTraceControllerTest, StartFileSession) {
EXPECT_HRESULT_SUCCEEDED(controller.Stop(NULL));
EXPECT_EQ(NULL, controller.session());
EXPECT_STREQ(L"", controller.session_name());
- base::Delete(temp, false);
+ base::DeleteFile(temp, false);
}
TEST_F(EtwTraceControllerTest, EnableDisable) {
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;
}
diff --git a/chrome_frame/crash_reporting/minidump_test.cc b/chrome_frame/crash_reporting/minidump_test.cc
index 8475b9b..d8aa653 100644
--- a/chrome_frame/crash_reporting/minidump_test.cc
+++ b/chrome_frame/crash_reporting/minidump_test.cc
@@ -75,7 +75,7 @@ class MinidumpTest: public testing::Test {
}
dump_file_handle_.Close();
- EXPECT_TRUE(base::Delete(dump_file_, false));
+ EXPECT_TRUE(base::DeleteFile(dump_file_, false));
}
void EnsureDumpMapped() {
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc
index c3c5d4c..ff0e6ef 100644
--- a/chrome_frame/test/chrome_frame_test_utils.cc
+++ b/chrome_frame/test/chrome_frame_test_utils.cc
@@ -706,7 +706,7 @@ void ClearIESessionHistory() {
session_history_path = session_history_path.AppendASCII("Microsoft");
session_history_path = session_history_path.AppendASCII("Internet Explorer");
session_history_path = session_history_path.AppendASCII("Recovery");
- base::Delete(session_history_path, true);
+ base::DeleteFile(session_history_path, true);
}
std::string GetLocalIPv4Address() {
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index d3e3140..0b7d615 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -483,7 +483,7 @@ FakeExternalTab::FakeExternalTab() {
if (base::PathExists(user_data_dir_)) {
VLOG(1) << __FUNCTION__ << " deleting IE Profile user data directory "
<< user_data_dir_.value();
- bool deleted = base::Delete(user_data_dir_, true);
+ bool deleted = base::DeleteFile(user_data_dir_, true);
LOG_IF(ERROR, !deleted) << "Failed to delete user data directory directory "
<< user_data_dir_.value();
}
@@ -901,7 +901,7 @@ void CFUrlRequestUnittestRunner::StopFileLogger(bool print) {
}
}
- if (!log_file_.empty() && !base::Delete(log_file_, false))
+ if (!log_file_.empty() && !base::DeleteFile(log_file_, false))
LOG(ERROR) << "Failed to delete log file " << log_file_.value();
log_file_.clear();
diff --git a/chrome_frame/test/perf/chrome_frame_perftest.cc b/chrome_frame/test/perf/chrome_frame_perftest.cc
index 04f9a52..f068264 100644
--- a/chrome_frame/test/perf/chrome_frame_perftest.cc
+++ b/chrome_frame/test/perf/chrome_frame_perftest.cc
@@ -1329,7 +1329,7 @@ class EtwPerfSession {
}
~EtwPerfSession() {
- base::Delete(etl_log_file_, false);
+ base::DeleteFile(etl_log_file_, false);
}
void Start() {
diff --git a/chrome_frame/test/test_scrubber.cc b/chrome_frame/test/test_scrubber.cc
index 37abcc3..dc8902c 100644
--- a/chrome_frame/test/test_scrubber.cc
+++ b/chrome_frame/test/test_scrubber.cc
@@ -115,7 +115,7 @@ void TestScrubber::CleanUpFromTestRun() {
VLOG_IF(1, base::PathExists(data_directory))
<< __FUNCTION__ << " deleting user data directory "
<< data_directory.value();
- bool deleted = base::Delete(data_directory, true);
+ bool deleted = base::DeleteFile(data_directory, true);
LOG_IF(ERROR, !deleted)
<< "Failed to delete user data directory directory "
<< data_directory.value();
diff --git a/chrome_frame/test/test_with_web_server.cc b/chrome_frame/test/test_with_web_server.cc
index 06869ad..b002022 100644
--- a/chrome_frame/test/test_with_web_server.cc
+++ b/chrome_frame/test/test_with_web_server.cc
@@ -136,8 +136,8 @@ void ChromeFrameTestWithWebServer::TearDownTestCase() {
local_address_.clear();
delete loop_;
loop_ = NULL;
- base::Delete(CFInstall_path_, false);
- base::Delete(CFInstance_path_, false);
+ base::DeleteFile(CFInstall_path_, false);
+ base::DeleteFile(CFInstance_path_, false);
if (temp_dir_.IsValid())
EXPECT_TRUE(temp_dir_.Delete());
}
diff --git a/chromeos/dbus/cros_disks_client.cc b/chromeos/dbus/cros_disks_client.cc
index fd1183f..84ae312 100644
--- a/chromeos/dbus/cros_disks_client.cc
+++ b/chromeos/dbus/cros_disks_client.cc
@@ -409,7 +409,7 @@ class CrosDisksClientStubImpl : public CrosDisksClient {
// Remove the directory created in Mount().
base::WorkerPool::PostTaskAndReply(
FROM_HERE,
- base::Bind(base::IgnoreResult(&base::Delete),
+ base::Bind(base::IgnoreResult(&base::DeleteFile),
base::FilePath::FromUTF8Unsafe(device_path),
true /* recursive */),
callback,
diff --git a/chromeos/dbus/session_manager_client.cc b/chromeos/dbus/session_manager_client.cc
index ac7a9a7..39d3773 100644
--- a/chromeos/dbus/session_manager_client.cc
+++ b/chromeos/dbus/session_manager_client.cc
@@ -512,7 +512,7 @@ class SessionManagerClientStubImpl : public SessionManagerClient {
&user_policy_key_dir)) {
base::WorkerPool::PostTask(
FROM_HERE,
- base::Bind(base::IgnoreResult(&base::Delete),
+ base::Bind(base::IgnoreResult(&base::DeleteFile),
user_policy_key_dir, true),
false);
}
diff --git a/cloud_print/common/win/install_utils.cc b/cloud_print/common/win/install_utils.cc
index 0edb161..ea13714 100644
--- a/cloud_print/common/win/install_utils.cc
+++ b/cloud_print/common/win/install_utils.cc
@@ -175,7 +175,7 @@ void DeleteProgramDir(const std::string& delete_switch) {
if (!file_util::CreateTemporaryFile(&temp_path))
return;
base::CopyFile(installer_source, temp_path);
- base::DeleteAfterReboot(temp_path);
+ base::DeleteFileAfterReboot(temp_path);
CommandLine command_line(temp_path);
command_line.AppendSwitchPath(delete_switch, installer_source.DirName());
base::LaunchOptions options;
diff --git a/cloud_print/service/win/installer.cc b/cloud_print/service/win/installer.cc
index 9d0de9e..9a2602d 100644
--- a/cloud_print/service/win/installer.cc
+++ b/cloud_print/service/win/installer.cc
@@ -64,9 +64,9 @@ void DeleteShortcut(int dir_key, bool with_subdir) {
if (path.empty())
return;
if (with_subdir)
- base::Delete(path.DirName(), true);
+ base::DeleteFile(path.DirName(), true);
else
- base::Delete(path, false);
+ base::DeleteFile(path, false);
}
void DeleteShortcuts() {
@@ -95,7 +95,7 @@ HRESULT ProcessInstallerSwitches() {
if (!old_location.empty() &&
cloud_print::IsProgramsFilesParent(old_location) &&
old_location != cloud_print::GetInstallLocation(kGoogleUpdateId)) {
- base::Delete(old_location, true);
+ base::DeleteFile(old_location, true);
}
cloud_print::SetGoogleUpdateKeys(
@@ -120,7 +120,7 @@ HRESULT ProcessInstallerSwitches() {
base::FilePath delete_path = command_line.GetSwitchValuePath(kDeleteSwitch);
if (!delete_path.empty() &&
cloud_print::IsProgramsFilesParent(delete_path)) {
- base::Delete(delete_path, true);
+ base::DeleteFile(delete_path, true);
}
return S_OK;
}
diff --git a/cloud_print/service/win/service_listener.cc b/cloud_print/service/win/service_listener.cc
index 2b35b62..96c6bbf 100644
--- a/cloud_print/service/win/service_listener.cc
+++ b/cloud_print/service/win/service_listener.cc
@@ -43,7 +43,7 @@ std::string GetEnvironment(const base::FilePath& user_data_dir) {
DCHECK(base::PathExists(temp_file));
environment.SetString(SetupListener::kUserDataDirJsonValueName,
user_data_dir.value());
- base::Delete(temp_file, false);
+ base::DeleteFile(temp_file, false);
}
}
diff --git a/cloud_print/virtual_driver/win/install/setup.cc b/cloud_print/virtual_driver/win/install/setup.cc
index 510370f..740b2f2 100644
--- a/cloud_print/virtual_driver/win/install/setup.cc
+++ b/cloud_print/virtual_driver/win/install/setup.cc
@@ -156,9 +156,9 @@ HRESULT RegisterPortMonitor(bool install, const base::FilePath& install_path) {
return HRESULT_FROM_WIN32(exit_code);
}
} else {
- if (!base::Delete(target_path, false)) {
+ if (!base::DeleteFile(target_path, false)) {
SpoolerServiceCommand("stop");
- bool deleted = base::Delete(target_path, false);
+ bool deleted = base::DeleteFile(target_path, false);
SpoolerServiceCommand("start");
if(!deleted) {
@@ -480,7 +480,7 @@ HRESULT DoDelete(const base::FilePath& install_path) {
if (!base::DirectoryExists(install_path))
return S_FALSE;
Sleep(5000); // Give parent some time to exit.
- return base::Delete(install_path, true) ? S_OK : E_FAIL;
+ return base::DeleteFile(install_path, true) ? S_OK : E_FAIL;
}
HRESULT DoInstall(const base::FilePath& install_path) {
@@ -493,7 +493,7 @@ HRESULT DoInstall(const base::FilePath& install_path) {
if (!old_install_path.value().empty() &&
install_path != old_install_path) {
if (base::DirectoryExists(old_install_path))
- base::Delete(old_install_path, true);
+ base::DeleteFile(old_install_path, true);
}
CreateUninstallKey(kUninstallId, LoadLocalString(IDS_DRIVER_NAME),
kUninstallSwitch);
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
index ab235e6..f71bb3f 100644
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
+++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
@@ -125,7 +125,7 @@ void DeleteLeakedFiles(const base::FilePath& dir) {
for (base::FilePath file_path = enumerator.Next(); !file_path.empty();
file_path = enumerator.Next()) {
if (enumerator.GetInfo().GetLastModifiedTime() < delete_before)
- base::Delete(file_path, false);
+ base::DeleteFile(file_path, false);
}
}
@@ -503,7 +503,7 @@ BOOL WINAPI Monitor2EndDocPort(HANDLE port_handle) {
}
}
if (delete_file)
- base::Delete(port_data->file_path, false);
+ base::DeleteFile(port_data->file_path, false);
}
if (port_data->printer_handle != NULL) {
// Tell the spooler that the job is complete.
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc
index cce0327..0e32027 100644
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc
+++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc
@@ -74,10 +74,10 @@ class PortMonitorTest : public testing::Test {
base::FilePath path;
PathService::Get(base::DIR_LOCAL_APP_DATA, &path);
base::FilePath main_path = path.Append(kChromeExePath);
- ASSERT_TRUE(base::Delete(main_path, true));
+ ASSERT_TRUE(base::DeleteFile(main_path, true));
PathService::Get(base::DIR_LOCAL_APP_DATA, &path);
base::FilePath alternate_path = path.Append(kAlternateChromeExePath);
- ASSERT_TRUE(base::Delete(alternate_path, true));
+ ASSERT_TRUE(base::DeleteFile(alternate_path, true));
}
protected:
diff --git a/components/visitedlink/test/visitedlink_perftest.cc b/components/visitedlink/test/visitedlink_perftest.cc
index bbe52ec4..14216ea 100644
--- a/components/visitedlink/test/visitedlink_perftest.cc
+++ b/components/visitedlink/test/visitedlink_perftest.cc
@@ -66,7 +66,7 @@ class VisitedLink : public testing::Test {
ASSERT_TRUE(file_util::CreateTemporaryFile(&db_path_));
}
virtual void TearDown() {
- base::Delete(db_path_, false);
+ base::DeleteFile(db_path_, false);
}
};
diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc
index 0fa352f..466be32 100644
--- a/content/browser/download/base_file.cc
+++ b/content/browser/download/base_file.cc
@@ -198,7 +198,7 @@ void BaseFile::Cancel() {
if (!full_path_.empty()) {
bound_net_log_.AddEvent(net::NetLog::TYPE_DOWNLOAD_FILE_DELETED);
- base::Delete(full_path_, false);
+ base::DeleteFile(full_path_, false);
}
}
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index ef9cb15..38663b8 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -1211,7 +1211,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, ResumeWithDeletedFile) {
base::FilePath(FILE_PATH_LITERAL("rangereset.crdownload")));
// Delete the intermediate file.
- base::Delete(download->GetFullPath(), false);
+ base::DeleteFile(download->GetFullPath(), false);
DownloadUpdatedObserver completion_observer(
download, base::Bind(DownloadCompleteFilter));
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index 07c7558..00686d4 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -62,7 +62,7 @@ void DeleteDownloadedFile(const base::FilePath& path) {
// Make sure we only delete files.
if (!base::DirectoryExists(path))
- base::Delete(path, false);
+ base::DeleteFile(path, false);
}
// Wrapper around DownloadFile::Detach and DownloadFile::Cancel that
diff --git a/content/browser/download/save_file_manager.cc b/content/browser/download/save_file_manager.cc
index 3dab9d8..442c28e 100644
--- a/content/browser/download/save_file_manager.cc
+++ b/content/browser/download/save_file_manager.cc
@@ -411,7 +411,7 @@ void SaveFileManager::CancelSave(int save_id) {
// We've won a race with the UI thread--we finished the file before
// the UI thread cancelled it on us. Unfortunately, in this situation
// the cancel wins, so we need to delete the now detached file.
- base::Delete(save_file->FullPath(), false);
+ base::DeleteFile(save_file->FullPath(), false);
} else if (save_file->save_source() ==
SaveFileCreateInfo::SAVE_FILE_FROM_NET) {
// If the data comes from the net IO thread and hasn't completed
@@ -461,7 +461,7 @@ void SaveFileManager::SaveLocalFile(const GURL& original_file_url,
// final name later.
bool success = base::CopyFile(file_path, save_file->FullPath());
if (!success)
- base::Delete(save_file->FullPath(), false);
+ base::DeleteFile(save_file->FullPath(), false);
SaveFinished(save_id, original_file_url, render_process_id, success);
}
@@ -470,7 +470,7 @@ void SaveFileManager::OnDeleteDirectoryOrFile(const base::FilePath& full_path,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
DCHECK(!full_path.empty());
- base::Delete(full_path, is_dir);
+ base::DeleteFile(full_path, is_dir);
}
void SaveFileManager::RenameAllFiles(
@@ -524,7 +524,7 @@ void SaveFileManager::RemoveSavedFileFromFileMap(
if (it != save_file_map_.end()) {
SaveFile* save_file = it->second;
DCHECK(!save_file->InProgress());
- base::Delete(save_file->FullPath(), false);
+ base::DeleteFile(save_file->FullPath(), false);
delete save_file;
save_file_map_.erase(it);
}
diff --git a/content/browser/gpu/gpu_pixel_browsertest.cc b/content/browser/gpu/gpu_pixel_browsertest.cc
index 4adfeb5..498151d 100644
--- a/content/browser/gpu/gpu_pixel_browsertest.cc
+++ b/content/browser/gpu/gpu_pixel_browsertest.cc
@@ -255,7 +255,7 @@ class GpuPixelBrowserTest : public ContentBrowserTest {
LOG(ERROR) << "Can't save revision file to: "
<< rev_path.value();
rt = false;
- base::Delete(img_path, false);
+ base::DeleteFile(img_path, false);
} else {
LOG(INFO) << "Saved revision file to: "
<< rev_path.value();
@@ -425,7 +425,7 @@ class GpuPixelBrowserTest : public ContentBrowserTest {
}
ref_img_revision_ = max_revision;
for (size_t i = 0; i < outdated_revs.size(); ++i)
- base::Delete(outdated_revs[i], false);
+ base::DeleteFile(outdated_revs[i], false);
}
DISALLOW_COPY_AND_ASSIGN(GpuPixelBrowserTest);
diff --git a/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc b/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc
index c5e0eef..3b10025 100644
--- a/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc
+++ b/content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc
@@ -95,7 +95,7 @@ void BrowserWebKitPlatformSupportImpl::getPluginList(bool refresh,
int BrowserWebKitPlatformSupportImpl::databaseDeleteFile(
const WebKit::WebString& vfs_file_name, bool sync_dir) {
const base::FilePath& path = base::FilePath::FromUTF16Unsafe(vfs_file_name);
- return base::Delete(path, false) ? 0 : 1;
+ return base::DeleteFile(path, false) ? 0 : 1;
}
long long BrowserWebKitPlatformSupportImpl::availableDiskSpaceInBytes(
diff --git a/content/browser/indexed_db/indexed_db_context_impl.cc b/content/browser/indexed_db/indexed_db_context_impl.cc
index 917eac79..91c0c829 100644
--- a/content/browser/indexed_db/indexed_db_context_impl.cc
+++ b/content/browser/indexed_db/indexed_db_context_impl.cc
@@ -81,7 +81,7 @@ void ClearSessionOnlyOrigins(
continue;
if (special_storage_policy->IsStorageProtected(*iter))
continue;
- base::Delete(*file_path_iter, true);
+ base::DeleteFile(*file_path_iter, true);
}
}
@@ -173,7 +173,7 @@ void IndexedDBContextImpl::DeleteForOrigin(const GURL& origin_url) {
base::FilePath idb_directory = GetFilePath(origin_url);
EnsureDiskUsageCacheInitialized(origin_url);
const bool recursive = true;
- bool deleted = base::Delete(idb_directory, recursive);
+ bool deleted = base::DeleteFile(idb_directory, recursive);
QueryDiskAndUpdateQuotaUsage(origin_url);
if (deleted) {
diff --git a/content/browser/net/sqlite_persistent_cookie_store.cc b/content/browser/net/sqlite_persistent_cookie_store.cc
index e4eb78a..53f203a 100644
--- a/content/browser/net/sqlite_persistent_cookie_store.cc
+++ b/content/browser/net/sqlite_persistent_cookie_store.cc
@@ -831,7 +831,7 @@ bool SQLitePersistentCookieStore::Backend::EnsureDatabaseVersion() {
meta_table_.Reset();
db_.reset(new sql::Connection);
- if (!base::Delete(path_, false) ||
+ if (!base::DeleteFile(path_, false) ||
!db_->Open(path_) ||
!meta_table_.Init(
db_.get(), kCurrentVersionNumber, kCompatibleVersionNumber)) {
diff --git a/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc b/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc
index 9dffec4..46953868 100644
--- a/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc
+++ b/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc
@@ -173,7 +173,7 @@ int32_t PepperFlashFileMessageFilter::OnDeleteFileOrDir(
base::PLATFORM_FILE_ERROR_ACCESS_DENIED);
}
- bool result = base::Delete(full_path, recursive);
+ bool result = base::DeleteFile(full_path, recursive);
return ppapi::PlatformFileErrorToPepperError(result ?
base::PLATFORM_FILE_OK : base::PLATFORM_FILE_ERROR_ACCESS_DENIED);
}
diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc
index 1915baf..8b6556ee 100644
--- a/content/browser/storage_partition_impl_map.cc
+++ b/content/browser/storage_partition_impl_map.cc
@@ -233,7 +233,7 @@ void ObliterateOneDirectory(const base::FilePath& current_dir,
switch (action) {
case kDelete:
- base::Delete(to_delete, true);
+ base::DeleteFile(to_delete, true);
break;
case kEnqueue:
@@ -285,7 +285,7 @@ void BlockingObliteratePath(
// root and be done with it. Otherwise, signal garbage collection and do
// a best-effort delete of the on-disk structures.
if (valid_paths_to_keep.empty()) {
- base::Delete(root, true);
+ base::DeleteFile(root, true);
return;
}
closure_runner->PostTask(FROM_HERE, on_gc_required);
@@ -343,7 +343,7 @@ void BlockingGarbageCollect(
file_access_runner->PostTask(
FROM_HERE,
- base::Bind(base::IgnoreResult(&base::Delete), trash_directory, true));
+ base::Bind(base::IgnoreResult(&base::DeleteFile), trash_directory, true));
}
} // namespace
diff --git a/content/browser/web_contents/navigation_controller_impl_unittest.cc b/content/browser/web_contents/navigation_controller_impl_unittest.cc
index 8caa20d..2c327f2 100644
--- a/content/browser/web_contents/navigation_controller_impl_unittest.cc
+++ b/content/browser/web_contents/navigation_controller_impl_unittest.cc
@@ -3774,7 +3774,7 @@ class NavigationControllerHistoryTest : public NavigationControllerTest {
// Do normal cleanup before deleting the profile directory below.
NavigationControllerTest::TearDown();
- ASSERT_TRUE(base::Delete(test_dir_, true));
+ ASSERT_TRUE(base::DeleteFile(test_dir_, true));
ASSERT_FALSE(base::PathExists(test_dir_));
}
diff --git a/content/browser/web_contents/web_contents_drag_win.cc b/content/browser/web_contents/web_contents_drag_win.cc
index 414537b..4c1f132 100644
--- a/content/browser/web_contents/web_contents_drag_win.cc
+++ b/content/browser/web_contents/web_contents_drag_win.cc
@@ -255,8 +255,8 @@ void WebContentsDragWin::PrepareDragForDownload(
// We cannot know when the target application will be done using the temporary
// file, so schedule it to be deleted after rebooting.
- base::DeleteAfterReboot(download_path);
- base::DeleteAfterReboot(temp_dir_path);
+ base::DeleteFileAfterReboot(download_path);
+ base::DeleteFileAfterReboot(temp_dir_path);
// Provide the data as file (CF_HDROP). A temporary download file with the
// Zone.Identifier ADS (Alternate Data Stream) attached will be created.
diff --git a/content/common/sandbox_mac_diraccess_unittest.mm b/content/common/sandbox_mac_diraccess_unittest.mm
index 2619ae6..ad86e58 100644
--- a/content/common/sandbox_mac_diraccess_unittest.mm
+++ b/content/common/sandbox_mac_diraccess_unittest.mm
@@ -135,7 +135,7 @@ class ScopedDirectoryDelete {
public:
inline void operator()(base::FilePath* x) const {
if (x) {
- base::Delete(*x, true);
+ base::DeleteFile(*x, true);
}
}
};
diff --git a/content/common/sandbox_mac_fontloading_unittest.mm b/content/common/sandbox_mac_fontloading_unittest.mm
index b4a4743..9afbaf4 100644
--- a/content/common/sandbox_mac_fontloading_unittest.mm
+++ b/content/common/sandbox_mac_fontloading_unittest.mm
@@ -122,7 +122,7 @@ TEST_F(MacSandboxTest, FontLoadingTest) {
ASSERT_TRUE(RunTestInSandbox(SANDBOX_TYPE_RENDERER,
"FontLoadingTestCase", temp_file_path.value().c_str()));
temp_file_closer.reset();
- ASSERT_TRUE(base::Delete(temp_file_path, false));
+ ASSERT_TRUE(base::DeleteFile(temp_file_path, false));
}
} // namespace content
diff --git a/ipc/ipc_channel_posix_unittest.cc b/ipc/ipc_channel_posix_unittest.cc
index 2c6e53e..d98d0fa 100644
--- a/ipc/ipc_channel_posix_unittest.cc
+++ b/ipc/ipc_channel_posix_unittest.cc
@@ -375,7 +375,7 @@ TEST_F(IPCChannelPosixTest, IsNamedServerInitialized) {
const std::string& connection_socket_name = GetConnectionSocketName();
IPCChannelPosixTestListener listener(false);
IPC::ChannelHandle chan_handle(connection_socket_name);
- ASSERT_TRUE(base::Delete(base::FilePath(connection_socket_name), false));
+ ASSERT_TRUE(base::DeleteFile(base::FilePath(connection_socket_name), false));
ASSERT_FALSE(IPC::Channel::IsNamedServerInitialized(
connection_socket_name));
IPC::Channel channel(chan_handle, IPC::Channel::MODE_NAMED_SERVER, &listener);
diff --git a/net/base/file_stream_unittest.cc b/net/base/file_stream_unittest.cc
index 02f0072..1a159676 100644
--- a/net/base/file_stream_unittest.cc
+++ b/net/base/file_stream_unittest.cc
@@ -44,7 +44,7 @@ class FileStreamTest : public PlatformTest {
file_util::WriteFile(temp_file_path_, kTestData, kTestDataSize);
}
virtual void TearDown() {
- EXPECT_TRUE(base::Delete(temp_file_path_, false));
+ EXPECT_TRUE(base::DeleteFile(temp_file_path_, false));
PlatformTest::TearDown();
}
@@ -116,7 +116,7 @@ TEST_F(FileStreamTest, UseFileHandle) {
read_stream.reset();
// 2. Test writing with a file handle.
- base::Delete(temp_file_path(), false);
+ base::DeleteFile(temp_file_path(), false);
flags = base::PLATFORM_FILE_OPEN_ALWAYS | base::PLATFORM_FILE_WRITE;
file = base::CreatePlatformFile(temp_file_path(), flags, &created, NULL);
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index 91b9a14..31adbc4 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -277,7 +277,7 @@ TEST_F(DiskCacheTest, CreateBackend) {
TEST_F(DiskCacheBackendTest, CreateBackend_MissingFile) {
ASSERT_TRUE(CopyTestCache("bad_entry"));
base::FilePath filename = cache_path_.AppendASCII("data_1");
- base::Delete(filename, false);
+ base::DeleteFile(filename, false);
base::Thread cache_thread("CacheThread");
ASSERT_TRUE(cache_thread.StartWithOptions(
base::Thread::Options(base::MessageLoop::TYPE_IO, 0)));
@@ -2783,7 +2783,7 @@ TEST_F(DiskCacheBackendTest, FileSharing) {
EXPECT_TRUE(file2.IsValid());
#endif
- EXPECT_TRUE(base::Delete(name, false));
+ EXPECT_TRUE(base::DeleteFile(name, false));
// We should be able to use the file.
const int kSize = 200;
diff --git a/net/disk_cache/cache_util_posix.cc b/net/disk_cache/cache_util_posix.cc
index 4e8e647..b33c560 100644
--- a/net/disk_cache/cache_util_posix.cc
+++ b/net/disk_cache/cache_util_posix.cc
@@ -40,7 +40,7 @@ bool MoveCache(const base::FilePath& from_path, const base::FilePath& to_path) {
}
bool DeleteCacheFile(const base::FilePath& name) {
- return base::Delete(name, false);
+ return base::DeleteFile(name, false);
}
} // namespace disk_cache
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index f7f8d7b..9492a9e 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -1539,7 +1539,7 @@ TEST_F(DiskCacheEntryTest, MissingData) {
disk_cache::Addr address(0x80000001);
base::FilePath name = cache_impl_->GetFileName(address);
- EXPECT_TRUE(base::Delete(name, false));
+ EXPECT_TRUE(base::DeleteFile(name, false));
// Attempt to read the data.
ASSERT_EQ(net::OK, OpenEntry(key, &entry));
diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc
index e154553..ab794079 100644
--- a/net/disk_cache/simple/simple_index_file.cc
+++ b/net/disk_cache/simple/simple_index_file.cc
@@ -51,7 +51,7 @@ void WriteToDiskInternal(const base::FilePath& index_filename,
// TODO(felipeg): Add better error handling.
LOG(ERROR) << "Could not write Simple Cache index to temporary file: "
<< temp_filename.value();
- base::Delete(temp_filename, /* recursive = */ false);
+ base::DeleteFile(temp_filename, /* recursive = */ false);
} else {
// Swap temp and index_file.
bool result = base::ReplaceFile(temp_filename, index_filename, NULL);
@@ -229,14 +229,14 @@ scoped_ptr<SimpleIndex::EntrySet> SimpleIndexFile::SyncLoadFromDisk(
std::string contents;
if (!file_util::ReadFileToString(index_filename, &contents)) {
LOG(WARNING) << "Could not read Simple Index file.";
- base::Delete(index_filename, false);
+ base::DeleteFile(index_filename, false);
return scoped_ptr<SimpleIndex::EntrySet>();
}
scoped_ptr<SimpleIndex::EntrySet> entries =
SimpleIndexFile::Deserialize(contents.data(), contents.size());
if (!entries) {
- base::Delete(index_filename, false);
+ base::DeleteFile(index_filename, false);
return scoped_ptr<SimpleIndex::EntrySet>();
}
@@ -316,7 +316,7 @@ scoped_ptr<SimpleIndex::EntrySet> SimpleIndexFile::SyncRestoreFromDisk(
const base::FilePath& index_file_path) {
LOG(INFO) << "Simple Cache Index is being restored from disk.";
- base::Delete(index_file_path, /* recursive = */ false);
+ base::DeleteFile(index_file_path, /* recursive = */ false);
scoped_ptr<SimpleIndex::EntrySet> index_file_entries(
new SimpleIndex::EntrySet());
diff --git a/net/disk_cache/simple/simple_synchronous_entry.cc b/net/disk_cache/simple/simple_synchronous_entry.cc
index 421591d..2b9c687 100644
--- a/net/disk_cache/simple/simple_synchronous_entry.cc
+++ b/net/disk_cache/simple/simple_synchronous_entry.cc
@@ -185,7 +185,7 @@ bool SimpleSynchronousEntry::DeleteFilesForEntryHash(
for (int i = 0; i < kSimpleEntryFileCount; ++i) {
FilePath to_delete = path.AppendASCII(
GetFilenameFromEntryHashAndIndex(entry_hash, i));
- if (!base::Delete(to_delete, false)) {
+ if (!base::DeleteFile(to_delete, false)) {
result = false;
DLOG(ERROR) << "Could not delete " << to_delete.MaybeAsASCII();
}
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 5c53148..4ad816d 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -45,7 +45,7 @@ namespace {
// Adaptor to delete a file on a worker thread.
void DeletePath(base::FilePath path) {
- base::Delete(path, false);
+ base::DeleteFile(path, false);
}
} // namespace
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index 11141ba..140ed3e 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -7611,7 +7611,7 @@ TEST_P(HttpNetworkTransactionTest, UploadFileSmallerThanLength) {
EXPECT_EQ(OK, rv);
EXPECT_EQ("hello world", response_data);
- base::Delete(temp_file_path, false);
+ base::DeleteFile(temp_file_path, false);
}
TEST_P(HttpNetworkTransactionTest, UploadUnreadableFile) {
@@ -7671,7 +7671,7 @@ TEST_P(HttpNetworkTransactionTest, UploadUnreadableFile) {
EXPECT_TRUE(response->headers.get() != NULL);
EXPECT_EQ("HTTP/1.0 200 OK", response->headers->GetStatusLine());
- base::Delete(temp_file, false);
+ base::DeleteFile(temp_file, false);
}
TEST_P(HttpNetworkTransactionTest, UnreadableUploadFileAfterAuthRestart) {
@@ -7762,7 +7762,7 @@ TEST_P(HttpNetworkTransactionTest, UnreadableUploadFileAfterAuthRestart) {
EXPECT_TRUE(response->auth_challenge.get() == NULL);
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine());
- base::Delete(temp_file, false);
+ base::DeleteFile(temp_file, false);
}
// Tests that changes to Auth realms are treated like auth rejections.
diff --git a/net/proxy/proxy_config_service_linux_unittest.cc b/net/proxy/proxy_config_service_linux_unittest.cc
index b024e08..03bba04 100644
--- a/net/proxy/proxy_config_service_linux_unittest.cc
+++ b/net/proxy/proxy_config_service_linux_unittest.cc
@@ -371,7 +371,7 @@ class ProxyConfigServiceLinuxTest : public PlatformTest {
virtual void TearDown() OVERRIDE {
// Delete the temporary KDE home directory.
- base::Delete(user_home_, true);
+ base::DeleteFile(user_home_, true);
PlatformTest::TearDown();
}
diff --git a/net/socket/unix_domain_socket_posix_unittest.cc b/net/socket/unix_domain_socket_posix_unittest.cc
index cc1f83a..41cd78f 100644
--- a/net/socket/unix_domain_socket_posix_unittest.cc
+++ b/net/socket/unix_domain_socket_posix_unittest.cc
@@ -183,7 +183,7 @@ class UnixDomainSocketTestHelper : public testing::Test {
void DeleteSocketFile() {
ASSERT_FALSE(file_path_.empty());
- base::Delete(file_path_, false /* not recursive */);
+ base::DeleteFile(file_path_, false /* not recursive */);
}
SocketDescriptor CreateClientSocket() {
diff --git a/net/url_request/url_fetcher_response_writer.cc b/net/url_request/url_fetcher_response_writer.cc
index 5e32f98..cb30dad 100644
--- a/net/url_request/url_fetcher_response_writer.cc
+++ b/net/url_request/url_fetcher_response_writer.cc
@@ -130,7 +130,7 @@ void URLFetcherFileWriter::CloseAndDeleteFile() {
file_stream_.reset();
DisownFile();
file_task_runner_->PostTask(FROM_HERE,
- base::Bind(base::IgnoreResult(&base::Delete),
+ base::Bind(base::IgnoreResult(&base::DeleteFile),
file_path_,
false /* recursive */));
}
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 02878b0..e3a3be8 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -765,7 +765,7 @@ TEST_F(URLRequestTest, FileTestFullSpecifiedRange) {
EXPECT_TRUE(partial_buffer_string == d.data_received());
}
- EXPECT_TRUE(base::Delete(temp_path, false));
+ EXPECT_TRUE(base::DeleteFile(temp_path, false));
}
TEST_F(URLRequestTest, FileTestHalfSpecifiedRange) {
@@ -808,7 +808,7 @@ TEST_F(URLRequestTest, FileTestHalfSpecifiedRange) {
EXPECT_TRUE(partial_buffer_string == d.data_received());
}
- EXPECT_TRUE(base::Delete(temp_path, false));
+ EXPECT_TRUE(base::DeleteFile(temp_path, false));
}
TEST_F(URLRequestTest, FileTestMultipleRanges) {
@@ -839,7 +839,7 @@ TEST_F(URLRequestTest, FileTestMultipleRanges) {
EXPECT_TRUE(d.request_failed());
}
- EXPECT_TRUE(base::Delete(temp_path, false));
+ EXPECT_TRUE(base::DeleteFile(temp_path, false));
}
TEST_F(URLRequestTest, InvalidUrlTest) {
diff --git a/printing/backend/cups_helper.cc b/printing/backend/cups_helper.cc
index 30a4b5b..1c143a5 100644
--- a/printing/backend/cups_helper.cc
+++ b/printing/backend/cups_helper.cc
@@ -350,7 +350,7 @@ bool parsePpdCapabilities(
ppd_file_path,
printer_capabilities.data(),
data_size)) {
- base::Delete(ppd_file_path, false);
+ base::DeleteFile(ppd_file_path, false);
return false;
}
@@ -387,7 +387,7 @@ bool parsePpdCapabilities(
caps.color_default = is_color;
ppdClose(ppd);
- base::Delete(ppd_file_path, false);
+ base::DeleteFile(ppd_file_path, false);
*printer_info = caps;
return true;
diff --git a/printing/backend/print_backend_cups.cc b/printing/backend/print_backend_cups.cc
index b28ca2c..e13cac9 100644
--- a/printing/backend/print_backend_cups.cc
+++ b/printing/backend/print_backend_cups.cc
@@ -246,7 +246,7 @@ bool PrintBackendCUPS::GetPrinterCapsAndDefaults(
std::string content;
bool res = file_util::ReadFileToString(ppd_path, &content);
- base::Delete(ppd_path, false);
+ base::DeleteFile(ppd_path, false);
if (res) {
printer_info->printer_capabilities.swap(content);
@@ -368,7 +368,7 @@ base::FilePath PrintBackendCUPS::GetPPD(const char* name) {
<< ", name: " << name
<< ", CUPS error: " << static_cast<int>(error_code)
<< ", HTTP error: " << http_error;
- base::Delete(ppd_path, false);
+ base::DeleteFile(ppd_path, false);
ppd_path.clear();
}
}
diff --git a/remoting/host/config_file_watcher_unittest.cc b/remoting/host/config_file_watcher_unittest.cc
index 7901da3..58b11e7 100644
--- a/remoting/host/config_file_watcher_unittest.cc
+++ b/remoting/host/config_file_watcher_unittest.cc
@@ -89,7 +89,7 @@ void ConfigFileWatcherTest::SetUp() {
void ConfigFileWatcherTest::TearDown() {
// Delete the test file.
if (!config_file_.empty())
- base::Delete(config_file_, false);
+ base::DeleteFile(config_file_, false);
}
// Verifies that the initial notification is delivered.
diff --git a/remoting/host/pairing_registry_delegate_linux_unittest.cc b/remoting/host/pairing_registry_delegate_linux_unittest.cc
index d89a8e9..6f18d09 100644
--- a/remoting/host/pairing_registry_delegate_linux_unittest.cc
+++ b/remoting/host/pairing_registry_delegate_linux_unittest.cc
@@ -70,7 +70,7 @@ TEST_F(PairingRegistryDelegateLinuxTest, SaveAndLoad) {
run_loop.Run();
- base::Delete(temp_dir, true);
+ base::DeleteFile(temp_dir, true);
};
} // namespace remoting
diff --git a/sql/connection.cc b/sql/connection.cc
index f2164ec3..5f76a7f 100644
--- a/sql/connection.cc
+++ b/sql/connection.cc
@@ -445,9 +445,9 @@ bool Connection::Delete(const base::FilePath& path) {
base::FilePath journal_path(path.value() + FILE_PATH_LITERAL("-journal"));
base::FilePath wal_path(path.value() + FILE_PATH_LITERAL("-wal"));
- base::Delete(journal_path, false);
- base::Delete(wal_path, false);
- base::Delete(path, false);
+ base::DeleteFile(journal_path, false);
+ base::DeleteFile(wal_path, false);
+ base::DeleteFile(path, false);
return !base::PathExists(journal_path) &&
!base::PathExists(wal_path) &&
diff --git a/sync/syncable/on_disk_directory_backing_store.cc b/sync/syncable/on_disk_directory_backing_store.cc
index cffa00f..1bebf9a 100644
--- a/sync/syncable/on_disk_directory_backing_store.cc
+++ b/sync/syncable/on_disk_directory_backing_store.cc
@@ -87,7 +87,7 @@ DirOpenResult OnDiskDirectoryBackingStore::Load(
db_->set_exclusive_locking();
db_->set_page_size(4096);
db_->set_histogram_tag("SyncDirectory");
- base::Delete(backing_filepath_, false);
+ base::DeleteFile(backing_filepath_, false);
result = TryLoad(handles_map, delete_journals, kernel_load_info);
if (result == OPENED) {
diff --git a/sync/syncable/syncable_unittest.cc b/sync/syncable/syncable_unittest.cc
index 0ce1fd2..854bb2d 100644
--- a/sync/syncable/syncable_unittest.cc
+++ b/sync/syncable/syncable_unittest.cc
@@ -1669,7 +1669,7 @@ class OnDiskSyncableDirectoryTest : public SyncableDirectoryTest {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
file_path_ = temp_dir_.path().Append(
FILE_PATH_LITERAL("Test.sqlite3"));
- base::Delete(file_path_, true);
+ base::DeleteFile(file_path_, true);
CreateDirectory();
}
@@ -1677,7 +1677,7 @@ class OnDiskSyncableDirectoryTest : public SyncableDirectoryTest {
// This also closes file handles.
dir_->SaveChanges();
dir_.reset();
- base::Delete(file_path_, true);
+ base::DeleteFile(file_path_, true);
}
// Creates a new directory. Deletes the old directory, if it exists.
@@ -2125,7 +2125,7 @@ TEST_F(SyncableDirectoryManagement, TestFileRelease) {
dir.Close();
// Closing the directory should have released the backing database file.
- ASSERT_TRUE(base::Delete(path, true));
+ ASSERT_TRUE(base::DeleteFile(path, true));
}
class StressTransactionsDelegate : public base::PlatformThread::Delegate {
diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
index 652d56d..5192c10 100644
--- a/third_party/leveldatabase/env_chromium.cc
+++ b/third_party/leveldatabase/env_chromium.cc
@@ -619,7 +619,7 @@ Status ChromiumEnv::GetChildren(const std::string& dir,
Status ChromiumEnv::DeleteFile(const std::string& fname) {
Status result;
// TODO(jorlow): Should we assert this is a file?
- if (!::base::Delete(CreateFilePath(fname), false)) {
+ if (!::base::DeleteFile(CreateFilePath(fname), false)) {
result = MakeIOError(fname, "Could not delete file.", kDeleteFile);
RecordErrorAt(kDeleteFile);
}
@@ -642,7 +642,7 @@ Status ChromiumEnv::CreateDir(const std::string& name) {
Status ChromiumEnv::DeleteDir(const std::string& name) {
Status result;
// TODO(jorlow): Should we assert this is a directory?
- if (!::base::Delete(CreateFilePath(name), false)) {
+ if (!::base::DeleteFile(CreateFilePath(name), false)) {
result = MakeIOError(name, "Could not delete directory.", kDeleteDir);
RecordErrorAt(kDeleteDir);
}
diff --git a/webkit/browser/appcache/appcache_database.cc b/webkit/browser/appcache/appcache_database.cc
index dc23be3..de73084 100644
--- a/webkit/browser/appcache/appcache_database.cc
+++ b/webkit/browser/appcache/appcache_database.cc
@@ -1186,7 +1186,7 @@ bool AppCacheDatabase::DeleteExistingAndCreateNewDatabase() {
// This also deletes the disk cache data.
base::FilePath directory = db_file_path_.DirName();
- if (!base::Delete(directory, true) ||
+ if (!base::DeleteFile(directory, true) ||
!file_util::CreateDirectory(directory)) {
return false;
}
diff --git a/webkit/browser/appcache/appcache_storage_impl.cc b/webkit/browser/appcache/appcache_storage_impl.cc
index e516c10..d181ca6 100644
--- a/webkit/browser/appcache/appcache_storage_impl.cc
+++ b/webkit/browser/appcache/appcache_storage_impl.cc
@@ -1811,7 +1811,7 @@ void AppCacheStorageImpl::OnDiskCacheInitialized(int rv) {
if (!is_incognito_) {
VLOG(1) << "Deleting existing appcache data and starting over.";
db_thread_->PostTask(
- FROM_HERE, base::Bind(base::IgnoreResult(&base::Delete),
+ FROM_HERE, base::Bind(base::IgnoreResult(&base::DeleteFile),
cache_directory_, true));
}
}
diff --git a/webkit/browser/database/database_tracker.cc b/webkit/browser/database/database_tracker.cc
index cc14e140..e3b3c6a 100644
--- a/webkit/browser/database/database_tracker.cc
+++ b/webkit/browser/database/database_tracker.cc
@@ -416,8 +416,8 @@ bool DatabaseTracker::DeleteOrigin(const std::string& origin_identifier,
base::FilePath new_file = new_origin_dir.Append(database.BaseName());
base::Move(database, new_file);
}
- base::Delete(origin_dir, true);
- base::Delete(new_origin_dir, true); // might fail on windows.
+ base::DeleteFile(origin_dir, true);
+ base::DeleteFile(new_origin_dir, true); // might fail on windows.
databases_table_->DeleteOriginIdentifier(origin_identifier);
@@ -459,7 +459,7 @@ bool DatabaseTracker::LazyInit() {
kTemporaryDirectoryPattern);
for (base::FilePath directory = directories.Next(); !directory.empty();
directory = directories.Next()) {
- base::Delete(directory, true);
+ base::DeleteFile(directory, true);
}
}
@@ -472,7 +472,7 @@ bool DatabaseTracker::LazyInit() {
(!db_->Open(kTrackerDatabaseFullPath) ||
!sql::MetaTable::DoesTableExist(db_.get()))) {
db_->Close();
- if (!base::Delete(db_dir_, true))
+ if (!base::DeleteFile(db_dir_, true))
return false;
}
@@ -798,7 +798,7 @@ void DatabaseTracker::DeleteIncognitoDBDirectory() {
base::FilePath incognito_db_dir =
profile_path_.Append(kIncognitoDatabaseDirectoryName);
if (base::DirectoryExists(incognito_db_dir))
- base::Delete(incognito_db_dir, true);
+ base::DeleteFile(incognito_db_dir, true);
}
void DatabaseTracker::ClearSessionOnlyOrigins() {
diff --git a/webkit/browser/database/vfs_backend.cc b/webkit/browser/database/vfs_backend.cc
index 1f459f5..500598a 100644
--- a/webkit/browser/database/vfs_backend.cc
+++ b/webkit/browser/database/vfs_backend.cc
@@ -122,7 +122,7 @@ void VfsBackend::OpenTempFileInDirectory(
int VfsBackend::DeleteFile(const base::FilePath& file_path, bool sync_dir) {
if (!base::PathExists(file_path))
return SQLITE_OK;
- if (!base::Delete(file_path, false))
+ if (!base::DeleteFile(file_path, false))
return SQLITE_IOERR_DELETE;
int error_code = SQLITE_OK;
diff --git a/webkit/browser/dom_storage/session_storage_database.cc b/webkit/browser/dom_storage/session_storage_database.cc
index 0d8c572..5a9056a 100644
--- a/webkit/browser/dom_storage/session_storage_database.cc
+++ b/webkit/browser/dom_storage/session_storage_database.cc
@@ -296,7 +296,7 @@ bool SessionStorageDatabase::LazyOpen(bool create_if_needed) {
DCHECK(db == NULL);
// Clear the directory and try again.
- base::Delete(file_path_, true);
+ base::DeleteFile(file_path_, true);
s = TryToOpen(&db);
if (!s.ok()) {
LOG(WARNING) << "Failed to open leveldb in " << file_path_.value()
diff --git a/webkit/browser/fileapi/file_system_usage_cache.cc b/webkit/browser/fileapi/file_system_usage_cache.cc
index 9dcfaee..c1896fb 100644
--- a/webkit/browser/fileapi/file_system_usage_cache.cc
+++ b/webkit/browser/fileapi/file_system_usage_cache.cc
@@ -156,7 +156,7 @@ bool FileSystemUsageCache::Delete(const base::FilePath& usage_file_path) {
TRACE_EVENT0("FileSystem", "UsageCache::Delete");
DCHECK(CalledOnValidThread());
CloseCacheFiles();
- return base::Delete(usage_file_path, true);
+ return base::DeleteFile(usage_file_path, true);
}
void FileSystemUsageCache::CloseCacheFiles() {
diff --git a/webkit/browser/fileapi/native_file_util.cc b/webkit/browser/fileapi/native_file_util.cc
index efc6d42..32e9467 100644
--- a/webkit/browser/fileapi/native_file_util.cc
+++ b/webkit/browser/fileapi/native_file_util.cc
@@ -242,7 +242,7 @@ PlatformFileError NativeFileUtil::DeleteFile(const base::FilePath& path) {
return base::PLATFORM_FILE_ERROR_NOT_FOUND;
if (base::DirectoryExists(path))
return base::PLATFORM_FILE_ERROR_NOT_A_FILE;
- if (!base::Delete(path, false))
+ if (!base::DeleteFile(path, false))
return base::PLATFORM_FILE_ERROR_FAILED;
return base::PLATFORM_FILE_OK;
}
@@ -254,7 +254,7 @@ PlatformFileError NativeFileUtil::DeleteDirectory(const base::FilePath& path) {
return base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY;
if (!file_util::IsDirectoryEmpty(path))
return base::PLATFORM_FILE_ERROR_NOT_EMPTY;
- if (!base::Delete(path, false))
+ if (!base::DeleteFile(path, false))
return base::PLATFORM_FILE_ERROR_FAILED;
return base::PLATFORM_FILE_OK;
}
diff --git a/webkit/browser/fileapi/obfuscated_file_util.cc b/webkit/browser/fileapi/obfuscated_file_util.cc
index c4baa68..e0b5012 100644
--- a/webkit/browser/fileapi/obfuscated_file_util.cc
+++ b/webkit/browser/fileapi/obfuscated_file_util.cc
@@ -901,7 +901,7 @@ bool ObfuscatedFileUtil::DeleteDirectoryForOriginAndType(
// implementation.
// Information about failure would be useful for debugging.
DestroyDirectoryDatabase(origin, type);
- if (!base::Delete(origin_type_path, true /* recursive */))
+ if (!base::DeleteFile(origin_type_path, true /* recursive */))
return false;
}
@@ -935,7 +935,7 @@ bool ObfuscatedFileUtil::DeleteDirectoryForOriginAndType(
origin_database_->RemovePathForOrigin(
webkit_database::GetIdentifierFromOrigin(origin));
}
- if (!base::Delete(origin_path, true /* recursive */))
+ if (!base::DeleteFile(origin_path, true /* recursive */))
return false;
return true;
@@ -1104,7 +1104,7 @@ PlatformFileError ObfuscatedFileUtil::CreateFile(
created = true;
} else {
if (base::PathExists(dest_local_path)) {
- if (!base::Delete(dest_local_path, true /* recursive */)) {
+ if (!base::DeleteFile(dest_local_path, true /* recursive */)) {
NOTREACHED();
return base::PLATFORM_FILE_ERROR_FAILED;
}
@@ -1129,7 +1129,7 @@ PlatformFileError ObfuscatedFileUtil::CreateFile(
if (handle) {
DCHECK_NE(base::kInvalidPlatformFileValue, *handle);
base::ClosePlatformFile(*handle);
- base::Delete(dest_local_path, false /* recursive */);
+ base::DeleteFile(dest_local_path, false /* recursive */);
}
return base::PLATFORM_FILE_ERROR_FAILED;
}
@@ -1145,7 +1145,7 @@ PlatformFileError ObfuscatedFileUtil::CreateFile(
DCHECK_NE(base::kInvalidPlatformFileValue, *handle);
base::ClosePlatformFile(*handle);
}
- base::Delete(dest_local_path, false /* recursive */);
+ base::DeleteFile(dest_local_path, false /* recursive */);
return base::PLATFORM_FILE_ERROR_FAILED;
}
TouchDirectory(db, dest_file_info->parent_id);
@@ -1240,7 +1240,7 @@ base::FilePath ObfuscatedFileUtil::GetDirectoryForOrigin(
base::FilePath path = file_system_directory_.Append(directory_name);
bool exists_in_fs = base::DirectoryExists(path);
if (!exists_in_db && exists_in_fs) {
- if (!base::Delete(path, true)) {
+ if (!base::DeleteFile(path, true)) {
if (error_code)
*error_code = base::PLATFORM_FILE_ERROR_FAILED;
return base::FilePath();
diff --git a/webkit/browser/fileapi/obfuscated_file_util_unittest.cc b/webkit/browser/fileapi/obfuscated_file_util_unittest.cc
index 1ceef8d..0e420e8 100644
--- a/webkit/browser/fileapi/obfuscated_file_util_unittest.cc
+++ b/webkit/browser/fileapi/obfuscated_file_util_unittest.cc
@@ -867,7 +867,7 @@ TEST_F(ObfuscatedFileUtilTest, TestQuotaOnTruncation) {
UnlimitedContext().get(),
url, &local_path));
ASSERT_FALSE(local_path.empty());
- ASSERT_TRUE(base::Delete(local_path, false));
+ ASSERT_TRUE(base::DeleteFile(local_path, false));
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND,
ofu()->Truncate(
@@ -1670,7 +1670,7 @@ TEST_F(ObfuscatedFileUtilTest, TestIncompleteDirectoryReading) {
base::FilePath local_path;
EXPECT_EQ(base::PLATFORM_FILE_OK,
ofu()->GetLocalFilePath(context.get(), kPath[0], &local_path));
- EXPECT_TRUE(base::Delete(local_path, false));
+ EXPECT_TRUE(base::DeleteFile(local_path, false));
entries.clear();
EXPECT_EQ(base::PLATFORM_FILE_OK,
diff --git a/webkit/browser/fileapi/sandbox_database_test_helper.cc b/webkit/browser/fileapi/sandbox_database_test_helper.cc
index 18babdb..6364b2b 100644
--- a/webkit/browser/fileapi/sandbox_database_test_helper.cc
+++ b/webkit/browser/fileapi/sandbox_database_test_helper.cc
@@ -90,7 +90,7 @@ void DeleteDatabaseFile(const base::FilePath& db_path,
EXPECT_TRUE(leveldb::ParseFileName(FilePathToString(file_path.BaseName()),
&number, &file_type));
if (file_type == type) {
- base::Delete(file_path, false);
+ base::DeleteFile(file_path, false);
// We may have multiple files for the same type, so don't break here.
}
}
diff --git a/webkit/browser/fileapi/sandbox_directory_database.cc b/webkit/browser/fileapi/sandbox_directory_database.cc
index 5e4ba3d..19e9c25 100644
--- a/webkit/browser/fileapi/sandbox_directory_database.cc
+++ b/webkit/browser/fileapi/sandbox_directory_database.cc
@@ -309,7 +309,7 @@ bool DatabaseCheckHelper::ScanDirectory() {
std::set<base::FilePath>::iterator itr =
files_in_db_.find(relative_file_path);
if (itr == files_in_db_.end()) {
- if (!base::Delete(absolute_file_path, false))
+ if (!base::DeleteFile(absolute_file_path, false))
return false;
} else {
files_in_db_.erase(itr);
@@ -748,7 +748,7 @@ bool SandboxDirectoryDatabase::Init(RecoveryOption recovery_option) {
// fall through
case DELETE_ON_CORRUPTION:
LOG(WARNING) << "Clearing SandboxDirectoryDatabase.";
- if (!base::Delete(filesystem_data_directory_, true))
+ if (!base::DeleteFile(filesystem_data_directory_, true))
return false;
if (!file_util::CreateDirectory(filesystem_data_directory_))
return false;
diff --git a/webkit/browser/fileapi/sandbox_directory_database_unittest.cc b/webkit/browser/fileapi/sandbox_directory_database_unittest.cc
index 9278129..593ead9 100644
--- a/webkit/browser/fileapi/sandbox_directory_database_unittest.cc
+++ b/webkit/browser/fileapi/sandbox_directory_database_unittest.cc
@@ -100,7 +100,7 @@ class SandboxDirectoryDatabaseTest : public testing::Test {
void ClearDatabaseAndDirectory() {
db_.reset();
- ASSERT_TRUE(base::Delete(path(), true /* recursive */));
+ ASSERT_TRUE(base::DeleteFile(path(), true /* recursive */));
ASSERT_TRUE(file_util::CreateDirectory(path()));
db_.reset(new SandboxDirectoryDatabase(path()));
}
@@ -535,7 +535,7 @@ TEST_F(SandboxDirectoryDatabaseTest,
CreateFile(0, FPL("foo"), kBackingFileName, NULL);
EXPECT_TRUE(db()->IsFileSystemConsistent());
- ASSERT_TRUE(base::Delete(path().Append(kBackingFileName), false));
+ ASSERT_TRUE(base::DeleteFile(path().Append(kBackingFileName), false));
CreateFile(0, FPL("bar"), kBackingFileName, NULL);
EXPECT_FALSE(db()->IsFileSystemConsistent());
}
@@ -545,7 +545,7 @@ TEST_F(SandboxDirectoryDatabaseTest, TestConsistencyCheck_FileLost) {
CreateFile(0, FPL("foo"), kBackingFileName, NULL);
EXPECT_TRUE(db()->IsFileSystemConsistent());
- ASSERT_TRUE(base::Delete(path().Append(kBackingFileName), false));
+ ASSERT_TRUE(base::DeleteFile(path().Append(kBackingFileName), false));
EXPECT_TRUE(db()->IsFileSystemConsistent());
}
diff --git a/webkit/browser/fileapi/sandbox_isolated_origin_database.cc b/webkit/browser/fileapi/sandbox_isolated_origin_database.cc
index d99ef85..77b00f9 100644
--- a/webkit/browser/fileapi/sandbox_isolated_origin_database.cc
+++ b/webkit/browser/fileapi/sandbox_isolated_origin_database.cc
@@ -73,7 +73,7 @@ void SandboxIsolatedOriginDatabase::MigrateDatabaseIfNeeded() {
base::FilePath to_path = file_system_directory_.Append(kOriginDirectory);
if (base::PathExists(to_path))
- base::Delete(to_path, true /* recursive */);
+ base::DeleteFile(to_path, true /* recursive */);
base::Move(from_path, to_path);
}
diff --git a/webkit/browser/fileapi/sandbox_origin_database.cc b/webkit/browser/fileapi/sandbox_origin_database.cc
index f85ddbe..e1ebc91 100644
--- a/webkit/browser/fileapi/sandbox_origin_database.cc
+++ b/webkit/browser/fileapi/sandbox_origin_database.cc
@@ -108,7 +108,7 @@ bool SandboxOriginDatabase::Init(InitOption init_option,
DB_REPAIR_FAILED, DB_REPAIR_MAX);
// fall through
case DELETE_ON_CORRUPTION:
- if (!base::Delete(file_system_directory_, true))
+ if (!base::DeleteFile(file_system_directory_, true))
return false;
if (!file_util::CreateDirectory(file_system_directory_))
return false;
@@ -167,7 +167,7 @@ bool SandboxOriginDatabase::RepairDatabase(const std::string& db_path) {
for (std::set<base::FilePath>::iterator dir_itr = directories.begin();
dir_itr != directories.end();
++dir_itr) {
- if (!base::Delete(file_system_directory_.Append(*dir_itr),
+ if (!base::DeleteFile(file_system_directory_.Append(*dir_itr),
true /* recursive */)) {
DropDatabase();
return false;
@@ -301,7 +301,7 @@ base::FilePath SandboxOriginDatabase::GetDatabasePath() const {
void SandboxOriginDatabase::RemoveDatabase() {
DropDatabase();
- base::Delete(GetDatabasePath(), true /* recursive */);
+ base::DeleteFile(GetDatabasePath(), true /* recursive */);
}
bool SandboxOriginDatabase::GetLastPathNumber(int* number) {
diff --git a/webkit/common/blob/scoped_file.cc b/webkit/common/blob/scoped_file.cc
index 56f0743..45d7b6b 100644
--- a/webkit/common/blob/scoped_file.cc
+++ b/webkit/common/blob/scoped_file.cc
@@ -63,10 +63,10 @@ void ScopedFile::Reset() {
}
if (scope_out_policy_ == DELETE_ON_SCOPE_OUT) {
- base::FileUtilProxy::Delete(file_task_runner_.get(),
- path_,
- false /* recursive */,
- base::FileUtilProxy::StatusCallback());
+ base::FileUtilProxy::DeleteFile(file_task_runner_.get(),
+ path_,
+ false /* recursive */,
+ base::FileUtilProxy::StatusCallback());
}
// Clear all fields.
diff --git a/webkit/plugins/npapi/plugin_instance.cc b/webkit/plugins/npapi/plugin_instance.cc
index 2e4f4ce..6eb91df 100644
--- a/webkit/plugins/npapi/plugin_instance.cc
+++ b/webkit/plugins/npapi/plugin_instance.cc
@@ -243,7 +243,7 @@ void PluginInstance::NPP_Destroy() {
for (unsigned int file_index = 0; file_index < files_created_.size();
file_index++) {
- base::Delete(files_created_[file_index], false);
+ base::DeleteFile(files_created_[file_index], false);
}
// Ensure that no timer callbacks are invoked after NPP_Destroy.
diff --git a/webkit/plugins/npapi/plugin_stream_posix.cc b/webkit/plugins/npapi/plugin_stream_posix.cc
index 7b02968..70b745c 100644
--- a/webkit/plugins/npapi/plugin_stream_posix.cc
+++ b/webkit/plugins/npapi/plugin_stream_posix.cc
@@ -38,7 +38,7 @@ bool PluginStream::OpenTempFile() {
temp_file_ = file_util::OpenFile(temp_file_path_, "a");
if (!temp_file_) {
- base::Delete(temp_file_path_, false);
+ base::DeleteFile(temp_file_path_, false);
ResetTempFileName();
return false;
}