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

Unified Diff: base/file_util_win.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
« no previous file with comments | « base/file_util_unittest.cc ('k') | base/files/file_path_watcher_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_win.cc
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index 928b66e525b16bd0f70426a0f625067a8a854ffc..90d8fca396e9950ede12cd94284f4726cbbc5ca1 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -180,7 +180,7 @@ bool CopyDirectory(const FilePath& from_path, const FilePath& to_path,
// Instead of creating a new directory, we copy the old one to include the
// security information of the folder as part of the copy.
- if (!file_util::PathExists(to_path)) {
+ if (!PathExists(to_path)) {
// Except that Vista fails to do that, and instead do a recursive copy if
// the target directory doesn't exist.
if (base::win::GetVersion() >= base::win::VERSION_VISTA)
@@ -193,6 +193,11 @@ bool CopyDirectory(const FilePath& from_path, const FilePath& to_path,
return ShellCopy(directory, to_path, false);
}
+bool PathExists(const FilePath& path) {
+ ThreadRestrictions::AssertIOAllowed();
+ return (GetFileAttributes(path.value().c_str()) != INVALID_FILE_ATTRIBUTES);
+}
+
} // namespace base
// -----------------------------------------------------------------------------
@@ -202,11 +207,6 @@ namespace file_util {
using base::FilePath;
using base::kFileShareAll;
-bool PathExists(const FilePath& path) {
- base::ThreadRestrictions::AssertIOAllowed();
- return (GetFileAttributes(path.value().c_str()) != INVALID_FILE_ATTRIBUTES);
-}
-
bool PathIsWritable(const FilePath& path) {
base::ThreadRestrictions::AssertIOAllowed();
HANDLE dir =
« no previous file with comments | « base/file_util_unittest.cc ('k') | base/files/file_path_watcher_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698