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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // This is used if type is MULTI_VALUE. | 98 // This is used if type is MULTI_VALUE. |
99 int num_choices; | 99 int num_choices; |
100 | 100 |
101 // Returns the name used in prefs for the choice at the specified |index|. | 101 // Returns the name used in prefs for the choice at the specified |index|. |
102 std::string NameForChoice(int index) const; | 102 std::string NameForChoice(int index) const; |
103 | 103 |
104 // Returns the human readable description for the choice at |index|. | 104 // Returns the human readable description for the choice at |index|. |
105 string16 DescriptionForChoice(int index) const; | 105 string16 DescriptionForChoice(int index) const; |
106 }; | 106 }; |
107 | 107 |
| 108 // A flag controlling the behavior of the |ConvertFlagsToSwitches| function - |
| 109 // whether it should add the sentinel switches around flags. |
| 110 enum SentinelsMode { kNoSentinels, kAddSentinels }; |
| 111 |
108 // Reads the Labs |prefs| (called "Labs" for historical reasons) and adds the | 112 // Reads the Labs |prefs| (called "Labs" for historical reasons) and adds the |
109 // commandline flags belonging to the active experiments to |command_line|. | 113 // commandline flags belonging to the active experiments to |command_line|. |
110 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, | 114 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
111 CommandLine* command_line); | 115 CommandLine* command_line, |
| 116 SentinelsMode sentinels); |
112 | 117 |
113 // Compares a set of switches of the two provided command line objects and | 118 // Compares a set of switches of the two provided command line objects and |
114 // returns true if they are the same and false otherwise. | 119 // returns true if they are the same and false otherwise. |
115 bool AreSwitchesIdenticalToCurrentCommandLine( | 120 bool AreSwitchesIdenticalToCurrentCommandLine( |
116 const CommandLine& new_cmdline, const CommandLine& active_cmdline); | 121 const CommandLine& new_cmdline, const CommandLine& active_cmdline); |
117 | 122 |
118 // Differentiate between generic flags available on a per session base and flags | 123 // Differentiate between generic flags available on a per session base and flags |
119 // that influence the whole machine and can be said by the admin only. This flag | 124 // that influence the whole machine and can be said by the admin only. This flag |
120 // is relevant for ChromeOS for now only and dictates whether entries marked | 125 // is relevant for ChromeOS for now only and dictates whether entries marked |
121 // with the |kOsCrOSOwnerOnly| label should be enabled in the UI or not. | 126 // with the |kOsCrOSOwnerOnly| label should be enabled in the UI or not. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 173 |
169 // Separator used for multi values. Multi values are represented in prefs as | 174 // Separator used for multi values. Multi values are represented in prefs as |
170 // name-of-experiment + kMultiSeparator + selected_index. | 175 // name-of-experiment + kMultiSeparator + selected_index. |
171 extern const char kMultiSeparator[]; | 176 extern const char kMultiSeparator[]; |
172 | 177 |
173 } // namespace testing | 178 } // namespace testing |
174 | 179 |
175 } // namespace about_flags | 180 } // namespace about_flags |
176 | 181 |
177 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ | 182 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ |
OLD | NEW |