| Index: tools/gn/substitution_writer.h
|
| diff --git a/tools/gn/substitution_writer.h b/tools/gn/substitution_writer.h
|
| index 2bc9ed2aa86ebe3e41af2a6a9dd9e3f783ef7d9b..dd8f77aa34a586491325bf086977a234c9fd92c2 100644
|
| --- a/tools/gn/substitution_writer.h
|
| +++ b/tools/gn/substitution_writer.h
|
| @@ -34,11 +34,18 @@ class SubstitutionWriter {
|
| ~SubstitutionWriter();
|
|
|
| // Applies the substitution pattern to a source file, returning the result
|
| - // as either a SourceFile or OutputFile.
|
| + // as either a string, a SourceFile or an OutputFile. If the result is
|
| + // expected to be a SourceFile or an OutputFile, this will CHECK if the
|
| + // result isn't in the correct directory. The caller should validate this
|
| + // first (see for example IsFileInOuputDir).
|
| static SourceFile ApplyPatternToSource(
|
| const Settings* settings,
|
| const SubstitutionPattern& pattern,
|
| const SourceFile& source);
|
| + static std::string ApplyPatternToSourceAsString(
|
| + const Settings* settings,
|
| + const SubstitutionPattern& pattern,
|
| + const SourceFile& source);
|
| static OutputFile ApplyPatternToSourceAsOutputFile(
|
| const Settings* settings,
|
| const SubstitutionPattern& pattern,
|
| @@ -53,6 +60,11 @@ class SubstitutionWriter {
|
| const SubstitutionList& list,
|
| const SourceFile& source,
|
| std::vector<SourceFile>* output);
|
| + static void ApplyListToSourceAsString(
|
| + const Settings* settings,
|
| + const SubstitutionList& list,
|
| + const SourceFile& source,
|
| + std::vector<std::string>* output);
|
| static void ApplyListToSourceAsOutputFile(
|
| const Settings* settings,
|
| const SubstitutionList& list,
|
| @@ -66,6 +78,11 @@ class SubstitutionWriter {
|
| const SubstitutionList& list,
|
| const std::vector<SourceFile>& sources,
|
| std::vector<SourceFile>* output);
|
| + static void ApplyListToSourcesAsString(
|
| + const Settings* settings,
|
| + const SubstitutionList& list,
|
| + const std::vector<SourceFile>& sources,
|
| + std::vector<std::string>* output);
|
| static void ApplyListToSourcesAsOutputFile(
|
| const Settings* settings,
|
| const SubstitutionList& list,
|
|
|