OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_LABS_H_ | 5 #ifndef CHROME_BROWSER_ABOUT_FLAGS_H_ |
6 #define CHROME_BROWSER_LABS_H_ | 6 #define CHROME_BROWSER_ABOUT_FLAGS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 class CommandLine; | 11 class CommandLine; |
12 class ListValue; | 12 class ListValue; |
13 class PrefService; | 13 class PrefService; |
14 | 14 |
15 // Can't be called "labs", that collides with the C function |labs()|. | 15 namespace about_flags { |
16 namespace about_labs { | |
17 | 16 |
18 // Returns if Labs is enabled (it isn't on the stable channel). | 17 // Returns if Flags is enabled (it isn't for ChromeOS at the moment). |
19 bool IsEnabled(); | 18 bool IsEnabled(); |
20 | 19 |
21 // Reads the Labs |prefs| and adds the commandline flags belonging | 20 // Reads the Labs |prefs| (called "Labs" for historical reasons) and adds the |
22 // to the active experiments to |command_line|. | 21 // commandline flags belonging to the active experiments to |command_line|. |
23 void ConvertLabsToSwitches(PrefService* prefs, CommandLine* command_line); | 22 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); |
24 | 23 |
25 // Get a list of all available experiments. The caller owns the result. | 24 // Get a list of all available experiments. The caller owns the result. |
26 ListValue* GetLabsExperimentsData(PrefService* prefs); | 25 ListValue* GetFlagsExperimentsData(PrefService* prefs); |
27 | 26 |
28 // Returns true if one of the experiment flags has been flipped since startup. | 27 // Returns true if one of the experiment flags has been flipped since startup. |
29 bool IsRestartNeededToCommitChanges(); | 28 bool IsRestartNeededToCommitChanges(); |
30 | 29 |
31 // Enables or disables the experiment with id |internal_name|. | 30 // Enables or disables the experiment with id |internal_name|. |
32 void SetExperimentEnabled( | 31 void SetExperimentEnabled( |
33 PrefService* prefs, const std::string& internal_name, bool enable); | 32 PrefService* prefs, const std::string& internal_name, bool enable); |
34 | 33 |
35 } // namespace Labs | 34 } // namespace about_flags |
36 | 35 |
37 #endif // CHROME_BROWSER_LABS_H_ | 36 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ |
OLD | NEW |