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

Unified Diff: base/file_util.h

Issue 2088006: Give the extension unpacker process a junction/symlink free path to the unpack directory. (Closed)
Patch Set: Rebase for commit. Created 10 years, 6 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/data/valgrind/base_unittests.gtest_mac.txt ('k') | base/file_util_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util.h
diff --git a/base/file_util.h b/base/file_util.h
index 414f7758f545e66dc0cb4b75a620dcff878be087..04afdecd28204064981172ed9d2ba93ff4dafe2b 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -281,12 +281,13 @@ bool IsDot(const FilePath& path);
// Returns true if the given path's base name is "..".
bool IsDotDot(const FilePath& path);
-#if defined(OS_POSIX)
-// Set |real_path| to |path| with symbolic links expanded.
-// Windows support (expanding junctions) comming soon:
-// http://crbug.com/13044
-bool RealPath(const FilePath& path, FilePath* real_path);
-#endif
+// Sets |real_path| to |path| with symbolic links and junctions expanded.
+// On windows, make sure the path starts with a lettered drive.
+// |path| must reference a file. Function will fail if |path| points to
+// a directory or to a nonexistent path. On windows, this function will
+// fail if |path| is a junction or symlink that points to an empty file,
+// or if |real_path| would be longer than MAX_PATH characters.
+bool NormalizeFilePath(const FilePath& path, FilePath* real_path);
// Used to hold information about a given file path. See GetFileInfo below.
struct FileInfo {
« no previous file with comments | « base/data/valgrind/base_unittests.gtest_mac.txt ('k') | base/file_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698