summaryrefslogtreecommitdiffstats
path: root/cloud_print
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-01 19:41:02 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-01 19:41:02 +0000
commit918efbf64de58c82ffa3cd8799d9ad822811a37a (patch)
tree5ceffb5e1576177d75f1aa8546bcae074df63c1e /cloud_print
parente07f44f6b208541c9602bb9cc5f311612aaab64a (diff)
downloadchromium_src-918efbf64de58c82ffa3cd8799d9ad822811a37a.zip
chromium_src-918efbf64de58c82ffa3cd8799d9ad822811a37a.tar.gz
chromium_src-918efbf64de58c82ffa3cd8799d9ad822811a37a.tar.bz2
Move file_util::Delete to the base namespace
BUG= Review URL: https://codereview.chromium.org/16950028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209475 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print')
-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
5 files changed, 13 insertions, 13 deletions
diff --git a/cloud_print/service/win/installer.cc b/cloud_print/service/win/installer.cc
index 57b4771..9d0de9e 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)
- file_util::Delete(path.DirName(), true);
+ base::Delete(path.DirName(), true);
else
- file_util::Delete(path, false);
+ base::Delete(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)) {
- file_util::Delete(old_location, true);
+ base::Delete(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)) {
- file_util::Delete(delete_path, true);
+ base::Delete(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 1d8cbf5..51d9c93 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(file_util::PathExists(temp_file));
environment.SetString(SetupListener::kUserDataDirJsonValueName,
user_data_dir.value());
- file_util::Delete(temp_file, false);
+ base::Delete(temp_file, false);
}
}
diff --git a/cloud_print/virtual_driver/win/install/setup.cc b/cloud_print/virtual_driver/win/install/setup.cc
index 26fc32f..f1b870a 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 (!file_util::Delete(target_path, false)) {
+ if (!base::Delete(target_path, false)) {
SpoolerServiceCommand("stop");
- bool deleted = file_util::Delete(target_path, false);
+ bool deleted = base::Delete(target_path, false);
SpoolerServiceCommand("start");
if(!deleted) {
@@ -480,7 +480,7 @@ HRESULT DoDelete(const base::FilePath& install_path) {
if (!file_util::DirectoryExists(install_path))
return S_FALSE;
Sleep(5000); // Give parent some time to exit.
- return file_util::Delete(install_path, true) ? S_OK : E_FAIL;
+ return base::Delete(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 (file_util::DirectoryExists(old_install_path))
- file_util::Delete(old_install_path, true);
+ base::Delete(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 084816e..657cfef 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)
- file_util::Delete(file_path, false);
+ base::Delete(file_path, false);
}
}
@@ -503,7 +503,7 @@ BOOL WINAPI Monitor2EndDocPort(HANDLE port_handle) {
}
}
if (delete_file)
- file_util::Delete(port_data->file_path, false);
+ base::Delete(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 1ab8a36..985b386 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(file_util::Delete(main_path, true));
+ ASSERT_TRUE(base::Delete(main_path, true));
PathService::Get(base::DIR_LOCAL_APP_DATA, &path);
base::FilePath alternate_path = path.Append(kAlternateChromeExePath);
- ASSERT_TRUE(file_util::Delete(alternate_path, true));
+ ASSERT_TRUE(base::Delete(alternate_path, true));
}
protected: