diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-16 19:10:23 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-16 19:10:23 +0000 |
commit | dd3aa79b68b6752e89a6be0af51506674925337a (patch) | |
tree | f70f4d0f405009fea8b53ad907d62184b45eaba0 /cloud_print | |
parent | 13816d3fcfe2e4e109752cf03fe15ebbaf23e85e (diff) | |
download | chromium_src-dd3aa79b68b6752e89a6be0af51506674925337a.zip chromium_src-dd3aa79b68b6752e89a6be0af51506674925337a.tar.gz chromium_src-dd3aa79b68b6752e89a6be0af51506674925337a.tar.bz2 |
Rename base::Delete to base::DeleteFile
Also renames DeleteAfterReboot to DeleteFileAfterReboot, and removes FileUtilProxy::RecursiveDelete which was never called.
BUG=
R=shess@chromium.org
Review URL: https://codereview.chromium.org/18584011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211822 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print')
6 files changed, 14 insertions, 14 deletions
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: |