| Index: tools/gn/input_file.h
|
| diff --git a/tools/gn/input_file.h b/tools/gn/input_file.h
|
| index 66cf55cfbdc9b635a49c0c5e461601ed6a3a94b0..edf39ff856d7829b75d29b6263c3e5dfc8ad7282 100644
|
| --- a/tools/gn/input_file.h
|
| +++ b/tools/gn/input_file.h
|
| @@ -17,16 +17,20 @@ class InputFile {
|
| public:
|
| InputFile(const SourceFile& name);
|
|
|
| - // Constructor for testing. Uses an empty file path and a given contents.
|
| - //InputFile(const char* contents);
|
| ~InputFile();
|
|
|
| + // The virtual name passed into the constructor. This does not take into
|
| + // account whether the file was loaded from the secondary source tree (see
|
| + // BuildSettings secondary_source_path).
|
| const SourceFile& name() const { return name_; }
|
|
|
| - // The directory is just a cached version of name_->GetDir() but we get this
|
| + // The directory is just a cached version of name()->GetDir() but we get this
|
| // a lot so computing it once up front saves a bunch of work.
|
| const SourceDir& dir() const { return dir_; }
|
|
|
| + // The physical name tells the actual name on disk, if there is one.
|
| + const base::FilePath& physical_name() const { return physical_name_; }
|
| +
|
| const std::string& contents() const {
|
| DCHECK(contents_loaded_);
|
| return contents_;
|
| @@ -43,6 +47,8 @@ class InputFile {
|
| SourceFile name_;
|
| SourceDir dir_;
|
|
|
| + base::FilePath physical_name_;
|
| +
|
| bool contents_loaded_;
|
| std::string contents_;
|
|
|
|
|