Index: tools/gn/filesystem_utils.h |
diff --git a/tools/gn/filesystem_utils.h b/tools/gn/filesystem_utils.h |
index 4d71ca7b8d86ab550948e27ecb3c49822a8a84d8..5f6c4ff595d363667233ddac09102d5ee0673547 100644 |
--- a/tools/gn/filesystem_utils.h |
+++ b/tools/gn/filesystem_utils.h |
@@ -111,8 +111,14 @@ bool MakeAbsolutePathRelativeIfPossible(const base::StringPiece& source_root, |
const base::StringPiece& path, |
std::string* dest); |
-// Collapses "." and sequential "/"s and evaluates "..". |
-void NormalizePath(std::string* path); |
+// Collapses "." and sequential "/"s and evaluates "..". |path| may be |
+// system-absolute, source-absolute, or relative. If |path| is source-absolute |
+// and |source_root| is non-empty, |path| may be system absolute after this |
+// function returns, if |path| references the filesystem outside of |
+// |source_root| (ex. path = "//.."). Otherwise, |path| will retain its |
+// relativity. |
+void NormalizePath(std::string* path, |
+ const base::StringPiece& source_root = base::StringPiece()); |
// Converts slashes to backslashes for Windows. Keeps the string unchanged |
// for other systems. |