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

Unified Diff: base/file_util_win.cc

Issue 13196006: Move path functions from file_util to FilePath object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move AsAbsolute back out of FilePath Created 7 years, 9 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: base/file_util_win.cc
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index f7897a0ab9b8d559a901f18c2fcab4f1987a8ef5..aee409ecb3f1de8bc81405f60ac13e894a71ffc2 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -28,6 +28,18 @@
using base::FilePath;
+namespace base {
+
+FilePath MakeAbsoluteFilePath(const FilePath& input) {
+ base::ThreadRestrictions::AssertIOAllowed();
+ wchar_t file_path[MAX_PATH];
+ if (!_wfullpath(file_path, input.value().c_str(), MAX_PATH))
+ return FilePath();
+ return FilePath(file_path);
+}
+
+} // namespace base
+
namespace file_util {
namespace {
@@ -37,15 +49,6 @@ const DWORD kFileShareAll =
} // namespace
-bool AbsolutePath(FilePath* path) {
- base::ThreadRestrictions::AssertIOAllowed();
- wchar_t file_path_buf[MAX_PATH];
- if (!_wfullpath(file_path_buf, path->value().c_str(), MAX_PATH))
- return false;
- *path = FilePath(file_path_buf);
- return true;
-}
-
int CountFilesCreatedAfter(const FilePath& path,
const base::Time& comparison_time) {
base::ThreadRestrictions::AssertIOAllowed();
« no previous file with comments | « base/file_util_unittest.cc ('k') | base/files/file_path.h » ('j') | base/files/file_path.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698