diff options
author | pastarmovj@chromium.org <pastarmovj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-12 17:37:40 +0000 |
---|---|---|
committer | pastarmovj@chromium.org <pastarmovj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-12 17:37:40 +0000 |
commit | e6d1c4f8756e0c8f75314f31ef3d538a0d7ffeca (patch) | |
tree | a9a76ba37d0418c93df99040d1a9bc6761440038 /chrome/browser/about_flags.h | |
parent | f7574895c6c11f2335059a29385bda29ffb75545 (diff) | |
download | chromium_src-e6d1c4f8756e0c8f75314f31ef3d538a0d7ffeca.zip chromium_src-e6d1c4f8756e0c8f75314f31ef3d538a0d7ffeca.tar.gz chromium_src-e6d1c4f8756e0c8f75314f31ef3d538a0d7ffeca.tar.bz2 |
Refactor the storage layer out of about_flags.
This step is a preparation for moving owner flags storage from local state to
signed settings.
BUG=221353
TEST=existing about_flags tests still pass.
Review URL: https://chromiumcodereview.appspot.com/16542004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/about_flags.h')
-rw-r--r-- | chrome/browser/about_flags.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/chrome/browser/about_flags.h b/chrome/browser/about_flags.h index 304fec1..2553425 100644 --- a/chrome/browser/about_flags.h +++ b/chrome/browser/about_flags.h @@ -19,6 +19,8 @@ class ListValue; namespace about_flags { +class FlagsStorage; + // Enumeration of OSs. // This is exposed only for testing. enum { kOsMac = 1 << 0, kOsWin = 1 << 1, kOsLinux = 1 << 2 , kOsCrOS = 1 << 3, @@ -105,7 +107,8 @@ struct Experiment { // Reads the Labs |prefs| (called "Labs" for historical reasons) and adds the // commandline flags belonging to the active experiments to |command_line|. -void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); +void ConvertFlagsToSwitches(FlagsStorage* flags_storage, + CommandLine* command_line); // Differentiate between generic flags available on a per session base and flags // that influence the whole machine and can be said by the admin only. This flag @@ -116,7 +119,7 @@ enum FlagAccess { kGeneralAccessFlagsOnly, kOwnerAccessToFlags }; // Get the list of experiments. Experiments that are available on the current // platform are appended to |supported_experiments|; all other experiments are // appended to |unsupported_experiments|. -void GetFlagsExperimentsData(PrefService* prefs, +void GetFlagsExperimentsData(FlagsStorage* flags_storage, FlagAccess access, base::ListValue* supported_experiments, base::ListValue* unsupported_experiments); @@ -125,8 +128,9 @@ void GetFlagsExperimentsData(PrefService* prefs, bool IsRestartNeededToCommitChanges(); // Enables or disables the experiment with id |internal_name|. -void SetExperimentEnabled( - PrefService* prefs, const std::string& internal_name, bool enable); +void SetExperimentEnabled(FlagsStorage* flags_storage, + const std::string& internal_name, + bool enable); // Removes all switches that were added to a command line by a previous call to // |ConvertFlagsToSwitches()|. @@ -134,7 +138,7 @@ void RemoveFlagsSwitches( std::map<std::string, CommandLine::StringType>* switch_list); // Reset all flags to the default state by clearing all flags. -void ResetAllFlags(PrefService* prefs); +void ResetAllFlags(FlagsStorage* flags_storage); // Returns the value for the current platform. This is one of the values defined // by the OS enum above. @@ -143,7 +147,7 @@ int GetCurrentPlatform(); // Sends UMA stats about experimental flag usage. This should be called once per // startup. -void RecordUMAStatistics(const PrefService* prefs); +void RecordUMAStatistics(FlagsStorage* flags_storage); namespace testing { |