| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef TOOLS_GN_BUILD_SETTINGS_H_ | 5 #ifndef TOOLS_GN_BUILD_SETTINGS_H_ |
| 6 #define TOOLS_GN_BUILD_SETTINGS_H_ | 6 #define TOOLS_GN_BUILD_SETTINGS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 // A list of files that can call exec_script(). If the returned pointer is | 89 // A list of files that can call exec_script(). If the returned pointer is |
| 90 // null, exec_script may be called from anywhere. | 90 // null, exec_script may be called from anywhere. |
| 91 const std::set<SourceFile>* exec_script_whitelist() const { | 91 const std::set<SourceFile>* exec_script_whitelist() const { |
| 92 return exec_script_whitelist_.get(); | 92 return exec_script_whitelist_.get(); |
| 93 } | 93 } |
| 94 void set_exec_script_whitelist(std::unique_ptr<std::set<SourceFile>> list) { | 94 void set_exec_script_whitelist(std::unique_ptr<std::set<SourceFile>> list) { |
| 95 exec_script_whitelist_ = std::move(list); | 95 exec_script_whitelist_ = std::move(list); |
| 96 } | 96 } |
| 97 | 97 |
| 98 // When set (the default), code should perform normal validation of inputs | |
| 99 // and structures, like undefined or possibly incorrectly used things. For | |
| 100 // some interrogation commands, we don't care about this and actually want | |
| 101 // to allow the user to check the structure of the build to solve their | |
| 102 // problem, and these checks are undesirable. | |
| 103 bool check_for_bad_items() const { | |
| 104 return check_for_bad_items_; | |
| 105 } | |
| 106 void set_check_for_bad_items(bool c) { | |
| 107 check_for_bad_items_ = c; | |
| 108 } | |
| 109 | |
| 110 private: | 98 private: |
| 111 base::FilePath root_path_; | 99 base::FilePath root_path_; |
| 112 std::string root_path_utf8_; | 100 std::string root_path_utf8_; |
| 113 base::FilePath secondary_source_path_; | 101 base::FilePath secondary_source_path_; |
| 114 base::FilePath python_path_; | 102 base::FilePath python_path_; |
| 115 | 103 |
| 116 SourceFile build_config_file_; | 104 SourceFile build_config_file_; |
| 117 SourceDir build_dir_; | 105 SourceDir build_dir_; |
| 118 Args build_args_; | 106 Args build_args_; |
| 119 | 107 |
| 120 ItemDefinedCallback item_defined_callback_; | 108 ItemDefinedCallback item_defined_callback_; |
| 121 PrintCallback print_callback_; | 109 PrintCallback print_callback_; |
| 122 | 110 |
| 123 std::unique_ptr<std::set<SourceFile>> exec_script_whitelist_; | 111 std::unique_ptr<std::set<SourceFile>> exec_script_whitelist_; |
| 124 | 112 |
| 125 bool check_for_bad_items_; | |
| 126 | |
| 127 BuildSettings& operator=(const BuildSettings& other); // Disallow. | 113 BuildSettings& operator=(const BuildSettings& other); // Disallow. |
| 128 }; | 114 }; |
| 129 | 115 |
| 130 #endif // TOOLS_GN_BUILD_SETTINGS_H_ | 116 #endif // TOOLS_GN_BUILD_SETTINGS_H_ |
| OLD | NEW |