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

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: git try Created 7 years, 8 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 6c7f0938bea7e7bcbc865d8c6f827accd3472e64..964302adce55b0cafab153460614e5bc2a81a1f3 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;
-}
-
bool Delete(const FilePath& path, bool recursive) {
base::ThreadRestrictions::AssertIOAllowed();

Powered by Google App Engine
This is Rietveld 408576698