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