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

Unified Diff: tools/gn/action_values.h

Issue 429423002: Refactor GN source expansions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/action_target_generator_unittest.cc ('k') | tools/gn/command_desc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/action_values.h
diff --git a/tools/gn/action_values.h b/tools/gn/action_values.h
index 7a70d3311a8339fd34225129461d517ed1fd7298..fcb6acab24da0380dcd55888613f08feb623675c 100644
--- a/tools/gn/action_values.h
+++ b/tools/gn/action_values.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "tools/gn/source_file.h"
+#include "tools/gn/substitution_list.h"
// Holds the values (outputs, args, script name, etc.) for either an action or
// an action_foreach target.
@@ -23,24 +24,24 @@ class ActionValues {
void set_script(const SourceFile& s) { script_ = s; }
// Arguments to the script.
- std::vector<std::string>& args() { return args_; }
- const std::vector<std::string>& args() const { return args_; }
+ SubstitutionList& args() { return args_; }
+ const SubstitutionList& args() const { return args_; }
// Files created by the script. These are strings rather than SourceFiles
// since they will often contain {{source expansions}}.
- std::vector<std::string>& outputs() { return outputs_; }
- const std::vector<std::string>& outputs() const { return outputs_; }
+ SubstitutionList& outputs() { return outputs_; }
+ const SubstitutionList& outputs() const { return outputs_; }
// Depfile generated by the script.
- const SourceFile& depfile() const { return depfile_; }
- bool has_depfile() const { return !depfile_.is_null(); }
- void set_depfile(const SourceFile& depfile) { depfile_ = depfile; }
+ const SubstitutionPattern& depfile() const { return depfile_; }
+ bool has_depfile() const { return !depfile_.ranges().empty(); }
+ void set_depfile(const SubstitutionPattern& depfile) { depfile_ = depfile; }
private:
SourceFile script_;
- std::vector<std::string> args_;
- std::vector<std::string> outputs_;
- SourceFile depfile_;
+ SubstitutionList args_;
+ SubstitutionList outputs_;
+ SubstitutionPattern depfile_;
DISALLOW_COPY_AND_ASSIGN(ActionValues);
};
« no previous file with comments | « tools/gn/action_target_generator_unittest.cc ('k') | tools/gn/command_desc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698