| Index: tools/gn/filesystem_utils.h
|
| diff --git a/tools/gn/filesystem_utils.h b/tools/gn/filesystem_utils.h
|
| index 20773cc7dd6a9e2354c943fb06211fca88a676ef..f5cf494ba8375774485cb49f8012fda49ea62b16 100644
|
| --- a/tools/gn/filesystem_utils.h
|
| +++ b/tools/gn/filesystem_utils.h
|
| @@ -116,11 +116,6 @@ bool MakeAbsolutePathRelativeIfPossible(const base::StringPiece& source_root,
|
| const base::StringPiece& path,
|
| std::string* dest);
|
|
|
| -// Converts a directory to its inverse (e.g. "/foo/bar/" -> "../../").
|
| -// This will be the empty string for the root directories ("/" and "//"), and
|
| -// in all other cases, this is guaranteed to end in a slash.
|
| -std::string InvertDir(const SourceDir& dir);
|
| -
|
| // Collapses "." and sequential "/"s and evaluates "..".
|
| void NormalizePath(std::string* path);
|
|
|
| @@ -128,10 +123,17 @@ void NormalizePath(std::string* path);
|
| // for other systems.
|
| void ConvertPathToSystem(std::string* path);
|
|
|
| -// Takes a source-absolute path (must begin with "//") and makes it relative
|
| -// to the given directory, which also must be source-absolute.
|
| -std::string RebaseSourceAbsolutePath(const std::string& input,
|
| - const SourceDir& dest_dir);
|
| +// Takes a path, |input|, and makes it relative to the given directory
|
| +// |dest_dir|. Both inputs may be source-relative (e.g. begins with
|
| +// with "//") or may be absolute.
|
| +//
|
| +// If supplied, the |source_root| parameter is the absolute path to
|
| +// the source root and not end in a slash. Unless you know that the
|
| +// inputs are always source relative, this should be supplied.
|
| +std::string RebasePath(
|
| + const std::string& input,
|
| + const SourceDir& dest_dir,
|
| + const base::StringPiece& source_root = base::StringPiece());
|
|
|
| // Returns the given directory with no terminating slash at the end, such that
|
| // appending a slash and more stuff will produce a valid path.
|
|
|