Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6625)

Unified Diff: chrome/installer/util/experiment_storage.h

Issue 2933043002: Installer support for Windows 10 inactive user toast. (Closed)
Patch Set: review feedback Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/util/experiment_metrics.h ('k') | chrome/installer/util/experiment_storage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/experiment_storage.h
diff --git a/chrome/installer/util/experiment_storage.h b/chrome/installer/util/experiment_storage.h
index 40ed1d2ef170780d915b561e4b4f920212bf0cbd..081bbe8ea15e2d68d2778639dff0d586ecbc0fa9 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,15 +38,11 @@ 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,
-
- // The client is not participating in the study.
- kNotParticipating,
-
- // The client is participating in the study.
- kIsParticipating,
+ // An identifier of which study the install participates in.
+ enum Study : uint32_t {
+ kNoStudySelected = 0,
+ kStudyOne = 1,
+ kStudyTwo = 2,
};
// Grants the holder exclusive access to the data in the registry. Consumers
@@ -56,12 +52,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
« no previous file with comments | « chrome/installer/util/experiment_metrics.h ('k') | chrome/installer/util/experiment_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698