Chromium Code Reviews| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 std::string NameForChoice(int index) const; | 100 std::string NameForChoice(int index) const; |
| 101 | 101 |
| 102 // Returns the human readable description for the choice at |index|. | 102 // Returns the human readable description for the choice at |index|. |
| 103 string16 DescriptionForChoice(int index) const; | 103 string16 DescriptionForChoice(int index) const; |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 // Reads the Labs |prefs| (called "Labs" for historical reasons) and adds the | 106 // Reads the Labs |prefs| (called "Labs" for historical reasons) and adds the |
| 107 // commandline flags belonging to the active experiments to |command_line|. | 107 // commandline flags belonging to the active experiments to |command_line|. |
| 108 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); | 108 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); |
| 109 | 109 |
| 110 // Compares a set of switches present in the provided command line to those | |
| 111 // in the current process command line and returns true if they are the same | |
|
Mattias Nissler (ping if slow)
2013/06/12 14:53:03
nit: you're actually passing both CommandLine refe
pastarmovj
2013/06/12 16:19:33
This comment was outdated. I changed this for bett
| |
| 112 // and false otherwise. | |
| 113 bool CompareSwitchesToCurrentCommandLine(const CommandLine& new_cmdline, | |
| 114 const CommandLine& active_cmdline); | |
| 115 | |
| 110 // Differentiate between generic flags available on a per session base and flags | 116 // Differentiate between generic flags available on a per session base and flags |
| 111 // that influence the whole machine and can be said by the admin only. This flag | 117 // that influence the whole machine and can be said by the admin only. This flag |
| 112 // is relevant for ChromeOS for now only and dictates whether entries marked | 118 // is relevant for ChromeOS for now only and dictates whether entries marked |
| 113 // with the |kOsCrOSOwnerOnly| label should be enabled in the UI or not. | 119 // with the |kOsCrOSOwnerOnly| label should be enabled in the UI or not. |
| 114 enum FlagAccess { kGeneralAccessFlagsOnly, kOwnerAccessToFlags }; | 120 enum FlagAccess { kGeneralAccessFlagsOnly, kOwnerAccessToFlags }; |
| 115 | 121 |
| 116 // Get the list of experiments. Experiments that are available on the current | 122 // Get the list of experiments. Experiments that are available on the current |
| 117 // platform are appended to |supported_experiments|; all other experiments are | 123 // platform are appended to |supported_experiments|; all other experiments are |
| 118 // appended to |unsupported_experiments|. | 124 // appended to |unsupported_experiments|. |
| 119 void GetFlagsExperimentsData(PrefService* prefs, | 125 void GetFlagsExperimentsData(PrefService* prefs, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 159 | 165 |
| 160 // Separator used for multi values. Multi values are represented in prefs as | 166 // Separator used for multi values. Multi values are represented in prefs as |
| 161 // name-of-experiment + kMultiSeparator + selected_index. | 167 // name-of-experiment + kMultiSeparator + selected_index. |
| 162 extern const char kMultiSeparator[]; | 168 extern const char kMultiSeparator[]; |
| 163 | 169 |
| 164 } // namespace testing | 170 } // namespace testing |
| 165 | 171 |
| 166 } // namespace about_flags | 172 } // namespace about_flags |
| 167 | 173 |
| 168 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ | 174 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ |
| OLD | NEW |