| OLD | NEW | 
|   1 // Copyright 2016 The Chromium Authors. All rights reserved. |   1 // Copyright 2016 The Chromium Authors. All rights reserved. | 
|   2 // Use of this source code is governed by a BSD-style license that can be |   2 // Use of this source code is governed by a BSD-style license that can be | 
|   3 // found in the LICENSE file. |   3 // found in the LICENSE file. | 
|   4  |   4  | 
|   5 #include "tools/gn/bundle_file_rule.h" |   5 #include "tools/gn/bundle_file_rule.h" | 
|   6  |   6  | 
|   7 #include "tools/gn/output_file.h" |   7 #include "tools/gn/output_file.h" | 
|   8 #include "tools/gn/settings.h" |   8 #include "tools/gn/settings.h" | 
|   9 #include "tools/gn/substitution_pattern.h" |   9 #include "tools/gn/substitution_pattern.h" | 
|  10 #include "tools/gn/substitution_writer.h" |  10 #include "tools/gn/substitution_writer.h" | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
|  39         output_path.append(bundle_data.resources_dir().value()); |  39         output_path.append(bundle_data.resources_dir().value()); | 
|  40         break; |  40         break; | 
|  41       case SUBSTITUTION_BUNDLE_EXECUTABLE_DIR: |  41       case SUBSTITUTION_BUNDLE_EXECUTABLE_DIR: | 
|  42         output_path.append(bundle_data.executable_dir().value()); |  42         output_path.append(bundle_data.executable_dir().value()); | 
|  43         break; |  43         break; | 
|  44       case SUBSTITUTION_BUNDLE_PLUGINS_DIR: |  44       case SUBSTITUTION_BUNDLE_PLUGINS_DIR: | 
|  45         output_path.append(bundle_data.plugins_dir().value()); |  45         output_path.append(bundle_data.plugins_dir().value()); | 
|  46         break; |  46         break; | 
|  47       default: |  47       default: | 
|  48         output_path.append(SubstitutionWriter::GetSourceSubstitution( |  48         output_path.append(SubstitutionWriter::GetSourceSubstitution( | 
|  49             settings, source_file, subrange.type, |  49             target_, target_->settings(), source_file, subrange.type, | 
|  50             SubstitutionWriter::OUTPUT_ABSOLUTE, SourceDir())); |  50             SubstitutionWriter::OUTPUT_ABSOLUTE, SourceDir())); | 
|  51         break; |  51         break; | 
|  52     } |  52     } | 
|  53   } |  53   } | 
|  54   return SourceFile(SourceFile::SWAP_IN, &output_path); |  54   return SourceFile(SourceFile::SWAP_IN, &output_path); | 
|  55 } |  55 } | 
|  56  |  56  | 
|  57 OutputFile BundleFileRule::ApplyPatternToSourceAsOutputFile( |  57 OutputFile BundleFileRule::ApplyPatternToSourceAsOutputFile( | 
|  58     const Settings* settings, |  58     const Settings* settings, | 
|  59     const BundleData& bundle_data, |  59     const BundleData& bundle_data, | 
|  60     const SourceFile& source_file) const { |  60     const SourceFile& source_file) const { | 
|  61   return OutputFile(settings->build_settings(), |  61   return OutputFile(settings->build_settings(), | 
|  62                     ApplyPatternToSource(settings, bundle_data, source_file)); |  62                     ApplyPatternToSource(settings, bundle_data, source_file)); | 
|  63 } |  63 } | 
| OLD | NEW |