| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_FLAGS_UI_FEATURE_ENTRY_MACROS_H_ | 5 #ifndef COMPONENTS_FLAGS_UI_FEATURE_ENTRY_MACROS_H_ |
| 6 #define COMPONENTS_FLAGS_UI_FEATURE_ENTRY_MACROS_H_ | 6 #define COMPONENTS_FLAGS_UI_FEATURE_ENTRY_MACROS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" |
| 9 |
| 8 // Macros to simplify specifying the type of FeatureEntry. Please refer to | 10 // Macros to simplify specifying the type of FeatureEntry. Please refer to |
| 9 // the comments on FeatureEntry::Type in feature_entry.h, which explain the | 11 // the comments on FeatureEntry::Type in feature_entry.h, which explain the |
| 10 // different entry types and when they should be used. | 12 // different entry types and when they should be used. |
| 11 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \ | 13 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \ |
| 12 flags_ui::FeatureEntry::SINGLE_VALUE, command_line_switch, switch_value, \ | 14 flags_ui::FeatureEntry::SINGLE_VALUE, command_line_switch, switch_value, \ |
| 13 nullptr, nullptr, nullptr, nullptr, 0 | 15 nullptr, nullptr, nullptr, nullptr, 0 |
| 14 #define SINGLE_VALUE_TYPE(command_line_switch) \ | 16 #define SINGLE_VALUE_TYPE(command_line_switch) \ |
| 15 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "") | 17 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "") |
| 16 #define SINGLE_DISABLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \ | 18 #define SINGLE_DISABLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \ |
| 17 flags_ui::FeatureEntry::SINGLE_DISABLE_VALUE, command_line_switch, \ | 19 flags_ui::FeatureEntry::SINGLE_DISABLE_VALUE, command_line_switch, \ |
| 18 switch_value, nullptr, nullptr, nullptr, nullptr, 0 | 20 switch_value, nullptr, nullptr, nullptr, nullptr, 0 |
| 19 #define SINGLE_DISABLE_VALUE_TYPE(command_line_switch) \ | 21 #define SINGLE_DISABLE_VALUE_TYPE(command_line_switch) \ |
| 20 SINGLE_DISABLE_VALUE_TYPE_AND_VALUE(command_line_switch, "") | 22 SINGLE_DISABLE_VALUE_TYPE_AND_VALUE(command_line_switch, "") |
| 21 #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \ | 23 #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \ |
| 22 disable_switch, disable_value) \ | 24 disable_switch, disable_value) \ |
| 23 flags_ui::FeatureEntry::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \ | 25 flags_ui::FeatureEntry::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \ |
| 24 disable_switch, disable_value, nullptr, nullptr, 3 | 26 disable_switch, disable_value, nullptr, nullptr, 3 |
| 25 #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \ | 27 #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \ |
| 26 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "") | 28 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "") |
| 27 #define MULTI_VALUE_TYPE(choices) \ | 29 #define MULTI_VALUE_TYPE(choices) \ |
| 28 flags_ui::FeatureEntry::MULTI_VALUE, nullptr, nullptr, nullptr, nullptr, \ | 30 flags_ui::FeatureEntry::MULTI_VALUE, nullptr, nullptr, nullptr, nullptr, \ |
| 29 nullptr, choices, arraysize(choices) | 31 nullptr, choices, arraysize(choices) |
| 30 #define FEATURE_VALUE_TYPE(feature) \ | 32 #define FEATURE_VALUE_TYPE(feature) \ |
| 31 flags_ui::FeatureEntry::FEATURE_VALUE, nullptr, nullptr, nullptr, nullptr, \ | 33 flags_ui::FeatureEntry::FEATURE_VALUE, nullptr, nullptr, nullptr, nullptr, \ |
| 32 &feature, nullptr, 3 | 34 &feature, nullptr, 3 |
| 33 | 35 |
| 34 #endif // COMPONENTS_FLAGS_UI_FEATURE_ENTRY_MACROS_H_ | 36 #endif // COMPONENTS_FLAGS_UI_FEATURE_ENTRY_MACROS_H_ |
| OLD | NEW |