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

Unified Diff: tools/gn/input_file.h

Issue 21983003: Make the Mac build work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dunnow Created 7 years, 4 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 | « tools/gn/config_values_generator.cc ('k') | tools/gn/input_file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « tools/gn/config_values_generator.cc ('k') | tools/gn/input_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698