OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_ABOUT_FLAGS_H_ | 5 #ifndef CHROME_BROWSER_ABOUT_FLAGS_H_ |
6 #define CHROME_BROWSER_ABOUT_FLAGS_H_ | 6 #define CHROME_BROWSER_ABOUT_FLAGS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <map> | 11 #include <map> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
16 #include "base/metrics/histogram_base.h" | 16 #include "base/metrics/histogram_base.h" |
17 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
18 #include "components/flags_ui/feature_entry.h" | 18 #include "components/flags_ui/feature_entry.h" |
19 #include "components/flags_ui/flags_state.h" | 19 #include "components/flags_ui/flags_state.h" |
20 | 20 |
21 namespace base { | 21 namespace base { |
| 22 class FeatureList; |
22 class ListValue; | 23 class ListValue; |
23 } | 24 } |
24 | 25 |
25 namespace flags_ui { | 26 namespace flags_ui { |
26 class FlagsStorage; | 27 class FlagsStorage; |
27 } | 28 } |
28 | 29 |
29 namespace about_flags { | 30 namespace about_flags { |
30 | 31 |
31 // Reads the state from |flags_storage| and adds the command line flags | 32 // Reads the state from |flags_storage| and adds the command line flags |
32 // belonging to the active feature entries to |command_line|. | 33 // belonging to the active feature entries to |command_line|. |
33 void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage, | 34 void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage, |
34 base::CommandLine* command_line, | 35 base::CommandLine* command_line, |
35 flags_ui::SentinelsMode sentinels); | 36 flags_ui::SentinelsMode sentinels); |
36 | 37 |
37 // Registers variations parameter values stored in |flags_storage| (previously | 38 // Registers variations parameter values selected for features in about:flags. |
38 // selected in about:flags). | 39 // The selected flags are retrieved from |flags_storage|, the registered |
| 40 // variation parameters are connected to their corresponding features in |
| 41 // |feature_list|. |
39 void RegisterAllFeatureVariationParameters( | 42 void RegisterAllFeatureVariationParameters( |
40 flags_ui::FlagsStorage* flags_storage); | 43 flags_ui::FlagsStorage* flags_storage, |
| 44 base::FeatureList* feature_list); |
41 | 45 |
42 // Compares a set of switches of the two provided command line objects and | 46 // Compares a set of switches of the two provided command line objects and |
43 // returns true if they are the same and false otherwise. | 47 // returns true if they are the same and false otherwise. |
44 // If |out_difference| is not NULL, it's filled with set_symmetric_difference | 48 // If |out_difference| is not NULL, it's filled with set_symmetric_difference |
45 // between sets. | 49 // between sets. |
46 bool AreSwitchesIdenticalToCurrentCommandLine( | 50 bool AreSwitchesIdenticalToCurrentCommandLine( |
47 const base::CommandLine& new_cmdline, | 51 const base::CommandLine& new_cmdline, |
48 const base::CommandLine& active_cmdline, | 52 const base::CommandLine& active_cmdline, |
49 std::set<base::CommandLine::StringType>* out_difference); | 53 std::set<base::CommandLine::StringType>* out_difference); |
50 | 54 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 98 |
95 // This value is reported as switch histogram ID if switch name has unknown | 99 // This value is reported as switch histogram ID if switch name has unknown |
96 // format. | 100 // format. |
97 extern const base::HistogramBase::Sample kBadSwitchFormatHistogramId; | 101 extern const base::HistogramBase::Sample kBadSwitchFormatHistogramId; |
98 | 102 |
99 } // namespace testing | 103 } // namespace testing |
100 | 104 |
101 } // namespace about_flags | 105 } // namespace about_flags |
102 | 106 |
103 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ | 107 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ |
OLD | NEW |