| Index: chrome/installer/util/experiment_storage.h
|
| diff --git a/chrome/installer/util/experiment_storage.h b/chrome/installer/util/experiment_storage.h
|
| index ad39e07743c77bdaaf19a979246b3621b89cbccd..c1e0f1d5c5d7560f2cbb0f4732c285c69f78d4ac 100644
|
| --- a/chrome/installer/util/experiment_storage.h
|
| +++ b/chrome/installer/util/experiment_storage.h
|
| @@ -18,9 +18,9 @@ struct ExperimentMetrics;
|
|
|
| // Manages the storage of experiment state on the machine.
|
| //
|
| -// Participation is a per-install property evaluated one time to determine
|
| -// whether or not the install as a whole participates in the study. It is
|
| -// stored in the install's ClientState key.
|
| +// Participation is a per-install property evaluated one time to determine which
|
| +// study the client participates in. It is stored in the install's ClientState
|
| +// key.
|
| //
|
| // ExperimentMetrics are stored in a per-install experiment_label, while the
|
| // fine-grained Experiment data are stored in a per-user key in Chrome's
|
| @@ -38,16 +38,13 @@ struct ExperimentMetrics;
|
| // mutex is used for all reads and writes to ensure consistent state.
|
| class ExperimentStorage {
|
| public:
|
| - enum class Participation {
|
| - // No participation state was found for the install.
|
| - kNotEvaluated,
|
| + // An identifier of which study the install participates in.
|
| + using Study = uint32_t;
|
|
|
| - // The client is not participating in the study.
|
| - kNotParticipating,
|
| -
|
| - // The client is participating in the study.
|
| - kIsParticipating,
|
| - };
|
| + // The possible Study values.
|
| + static constexpr Study kNoStudySelected = 0;
|
| + static constexpr Study kStudyOne = 1;
|
| + static constexpr Study kStudyTwo = 2;
|
|
|
| // Grants the holder exclusive access to the data in the registry. Consumers
|
| // are expected to not hold an instance across any blocking operations.
|
| @@ -56,12 +53,13 @@ class ExperimentStorage {
|
| ~Lock();
|
|
|
| // Reads the participation state for the install. Returns false in case of
|
| - // error.
|
| - bool ReadParticipation(Participation* participation);
|
| + // error. |participation| is set to kNotEvaluated if no value is present;
|
| + // otherwise, it is set to the value found.
|
| + bool ReadParticipation(Study* participation);
|
|
|
| // Writes the participation state for the install. Returns false if the
|
| // write failed.
|
| - bool WriteParticipation(Participation participation);
|
| + bool WriteParticipation(Study participation);
|
|
|
| // Loads the experiment metrics and data from the registry. Returns false if
|
| // the state in the registry corresponds to a different user or could not be
|
|
|