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_FLAGS_STATE_H_ | 5 #ifndef COMPONENTS_FLAGS_UI_FLAGS_STATE_H_ |
6 #define COMPONENTS_FLAGS_UI_FLAGS_STATE_H_ | 6 #define COMPONENTS_FLAGS_UI_FLAGS_STATE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <set> | 11 #include <set> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/callback_forward.h" | 14 #include "base/callback_forward.h" |
15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 class ListValue; | 19 class ListValue; |
20 class FeatureList; | |
Lei Zhang
2016/07/13 17:49:02
nitto ditto
jkrcal
2016/07/14 08:45:12
Done.
| |
20 } | 21 } |
21 | 22 |
22 namespace flags_ui { | 23 namespace flags_ui { |
23 | 24 |
24 // Internal functionality exposed for tests. | 25 // Internal functionality exposed for tests. |
25 namespace internal { | 26 namespace internal { |
26 // The trial group selected when feature variation parameters are registered via | 27 // The trial group selected when feature variation parameters are registered via |
27 // FlagsState::RegisterFeatureVariationParameters(). | 28 // FlagsState::RegisterFeatureVariationParameters(). |
28 extern const char kTrialGroupAboutFlags[]; | 29 extern const char kTrialGroupAboutFlags[]; |
29 } // namespace internal | 30 } // namespace internal |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 void SetFeatureEntryEnabled(FlagsStorage* flags_storage, | 76 void SetFeatureEntryEnabled(FlagsStorage* flags_storage, |
76 const std::string& internal_name, | 77 const std::string& internal_name, |
77 bool enable); | 78 bool enable); |
78 void RemoveFlagsSwitches( | 79 void RemoveFlagsSwitches( |
79 std::map<std::string, base::CommandLine::StringType>* switch_list); | 80 std::map<std::string, base::CommandLine::StringType>* switch_list); |
80 void ResetAllFlags(FlagsStorage* flags_storage); | 81 void ResetAllFlags(FlagsStorage* flags_storage); |
81 void Reset(); | 82 void Reset(); |
82 | 83 |
83 // Registers variations parameter values stored in |flags_storage| (previously | 84 // Registers variations parameter values stored in |flags_storage| (previously |
84 // selected in about:flags). | 85 // selected in about:flags). |
85 void RegisterAllFeatureVariationParameters(FlagsStorage* flags_storage); | 86 void RegisterAllFeatureVariationParameters(FlagsStorage* flags_storage, |
87 base::FeatureList* feature_list); | |
86 | 88 |
87 // Gets the list of feature entries. Entries that are available for the | 89 // Gets the list of feature entries. Entries that are available for the |
88 // current platform are appended to |supported_entries|; all other entries are | 90 // current platform are appended to |supported_entries|; all other entries are |
89 // appended to |unsupported_entries|. | 91 // appended to |unsupported_entries|. |
90 void GetFlagFeatureEntries( | 92 void GetFlagFeatureEntries( |
91 FlagsStorage* flags_storage, | 93 FlagsStorage* flags_storage, |
92 FlagAccess access, | 94 FlagAccess access, |
93 base::ListValue* supported_entries, | 95 base::ListValue* supported_entries, |
94 base::ListValue* unsupported_entries, | 96 base::ListValue* unsupported_entries, |
95 base::Callback<bool(const FeatureEntry&)> skip_feature_entry); | 97 base::Callback<bool(const FeatureEntry&)> skip_feature_entry); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
172 // Map from switch name to a set of string, that keeps track which strings | 174 // Map from switch name to a set of string, that keeps track which strings |
173 // were appended to existing (list value) switches. | 175 // were appended to existing (list value) switches. |
174 std::map<std::string, std::set<std::string>> appended_switches_; | 176 std::map<std::string, std::set<std::string>> appended_switches_; |
175 | 177 |
176 DISALLOW_COPY_AND_ASSIGN(FlagsState); | 178 DISALLOW_COPY_AND_ASSIGN(FlagsState); |
177 }; | 179 }; |
178 | 180 |
179 } // namespace flags_ui | 181 } // namespace flags_ui |
180 | 182 |
181 #endif // COMPONENTS_FLAGS_UI_FLAGS_STATE_H_ | 183 #endif // COMPONENTS_FLAGS_UI_FLAGS_STATE_H_ |
OLD | NEW |