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. |
|
Nikita (slow)
2014/06/19 17:08:07
How about adding comment somewhere in this file (n
Alexander Alekseev
2014/06/19 18:17:47
Done.
| |
| 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 <set> | |
| 9 #include <string> | 10 #include <string> |
| 10 | 11 |
| 11 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 12 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 13 | 14 |
| 14 class PrefService; | 15 class PrefService; |
| 15 | 16 |
| 16 namespace base { | 17 namespace base { |
| 17 class ListValue; | 18 class ListValue; |
| 18 } | 19 } |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 110 enum SentinelsMode { kNoSentinels, kAddSentinels }; | 111 enum SentinelsMode { kNoSentinels, kAddSentinels }; |
| 111 | 112 |
| 112 // Reads the Labs |prefs| (called "Labs" for historical reasons) and adds the | 113 // Reads the Labs |prefs| (called "Labs" for historical reasons) and adds the |
| 113 // commandline flags belonging to the active experiments to |command_line|. | 114 // commandline flags belonging to the active experiments to |command_line|. |
| 114 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, | 115 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
| 115 base::CommandLine* command_line, | 116 base::CommandLine* command_line, |
| 116 SentinelsMode sentinels); | 117 SentinelsMode sentinels); |
| 117 | 118 |
| 118 // Compares a set of switches of the two provided command line objects and | 119 // Compares a set of switches of the two provided command line objects and |
| 119 // returns true if they are the same and false otherwise. | 120 // returns true if they are the same and false otherwise. |
| 121 // If |out_difference| is not NULL, it's filled with set_symmetric_difference | |
| 122 // between sets. | |
| 120 bool AreSwitchesIdenticalToCurrentCommandLine( | 123 bool AreSwitchesIdenticalToCurrentCommandLine( |
| 121 const base::CommandLine& new_cmdline, | 124 const base::CommandLine& new_cmdline, |
| 122 const base::CommandLine& active_cmdline); | 125 const base::CommandLine& active_cmdline, |
| 126 std::set<CommandLine::StringType>* out_difference); | |
| 123 | 127 |
| 124 // Differentiate between generic flags available on a per session base and flags | 128 // Differentiate between generic flags available on a per session base and flags |
| 125 // that influence the whole machine and can be said by the admin only. This flag | 129 // that influence the whole machine and can be said by the admin only. This flag |
| 126 // is relevant for ChromeOS for now only and dictates whether entries marked | 130 // is relevant for ChromeOS for now only and dictates whether entries marked |
| 127 // with the |kOsCrOSOwnerOnly| label should be enabled in the UI or not. | 131 // with the |kOsCrOSOwnerOnly| label should be enabled in the UI or not. |
| 128 enum FlagAccess { kGeneralAccessFlagsOnly, kOwnerAccessToFlags }; | 132 enum FlagAccess { kGeneralAccessFlagsOnly, kOwnerAccessToFlags }; |
| 129 | 133 |
| 130 // Get the list of experiments. Experiments that are available on the current | 134 // Get the list of experiments. Experiments that are available on the current |
| 131 // platform are appended to |supported_experiments|; all other experiments are | 135 // platform are appended to |supported_experiments|; all other experiments are |
| 132 // appended to |unsupported_experiments|. | 136 // appended to |unsupported_experiments|. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 | 178 |
| 175 // Separator used for multi values. Multi values are represented in prefs as | 179 // Separator used for multi values. Multi values are represented in prefs as |
| 176 // name-of-experiment + kMultiSeparator + selected_index. | 180 // name-of-experiment + kMultiSeparator + selected_index. |
| 177 extern const char kMultiSeparator[]; | 181 extern const char kMultiSeparator[]; |
| 178 | 182 |
| 179 } // namespace testing | 183 } // namespace testing |
| 180 | 184 |
| 181 } // namespace about_flags | 185 } // namespace about_flags |
| 182 | 186 |
| 183 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ | 187 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ |
| OLD | NEW |