Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Unified Diff: chrome/installer/util/copy_tree_work_item.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/installer/util/copy_tree_work_item.cc
diff --git a/chrome/installer/util/copy_tree_work_item.cc b/chrome/installer/util/copy_tree_work_item.cc
index ea14ea1647a1a68ac5fd43c067c0c2f373572231..6f44e5918a3cc3906fb13bf5ed102bac15db6e7b 100644
--- a/chrome/installer/util/copy_tree_work_item.cc
+++ b/chrome/installer/util/copy_tree_work_item.cc
@@ -29,12 +29,12 @@ CopyTreeWorkItem::CopyTreeWorkItem(const base::FilePath& source_path,
}
bool CopyTreeWorkItem::Do() {
- if (!file_util::PathExists(source_path_)) {
+ if (!base::PathExists(source_path_)) {
LOG(ERROR) << source_path_.value() << " does not exist";
return false;
}
- bool dest_exist = file_util::PathExists(dest_path_);
+ bool dest_exist = base::PathExists(dest_path_);
// handle overwrite_option_ = IF_DIFFERENT case.
if ((dest_exist) &&
(overwrite_option_ == WorkItem::IF_DIFFERENT) && // only for single file
@@ -52,7 +52,7 @@ bool CopyTreeWorkItem::Do() {
(IsFileInUse(dest_path_))) {
// handle overwrite_option_ = NEW_NAME_IF_IN_USE case.
if (alternative_path_.empty() ||
- file_util::PathExists(alternative_path_) ||
+ base::PathExists(alternative_path_) ||
!base::CopyFile(source_path_, alternative_path_)) {
LOG(ERROR) << "failed to copy " << source_path_.value()
<< " to " << alternative_path_.value();
@@ -126,7 +126,7 @@ void CopyTreeWorkItem::Rollback() {
}
bool CopyTreeWorkItem::IsFileInUse(const base::FilePath& path) {
- if (!file_util::PathExists(path))
+ if (!base::PathExists(path))
return false;
HANDLE handle = ::CreateFile(path.value().c_str(), FILE_ALL_ACCESS,
« no previous file with comments | « chrome/installer/util/conditional_work_item_list.cc ('k') | chrome/installer/util/copy_tree_work_item_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698