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

Unified Diff: base/metrics/field_trial.h

Issue 2504163005: Fix getting initially active trials with shared memory. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | base/metrics/field_trial.cc » ('j') | base/metrics/field_trial.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/field_trial.h
diff --git a/base/metrics/field_trial.h b/base/metrics/field_trial.h
index 7fd067ad74c5841857b600fb37bdcbcc4964980a..f5297405aab2f152b74358c5670547e2dfdf4ab3 100644
--- a/base/metrics/field_trial.h
+++ b/base/metrics/field_trial.h
@@ -466,6 +466,14 @@ class BASE_EXPORT FieldTrialList {
const std::string& trials_string,
FieldTrial::ActiveGroups* active_groups);
+ // Returns the field trials that were active when the process was
+ // created. Either parses the field trial string or the shared memory
+ // holding field trial information.
+ // Must be called only after a call to CreateTrialsFromCommandLine().
+ static void GetInitiallyActiveFieldTrials(
+ const base::CommandLine& command_line,
+ FieldTrial::ActiveGroups* active_groups);
+
// Use a state string (re: StatesToString()) to augment the current list of
// field trials to include the supplied trials, and using a 100% probability
// for each trial, force them to have the same group string. This is commonly
@@ -611,6 +619,9 @@ class BASE_EXPORT FieldTrialList {
HANDLE readonly_allocator_handle_ = nullptr;
#endif
+ // Tracks whether CreateTrialsFromCommandLine() has been called.
+ bool create_trials_from_command_line_called_ = false;
+
DISALLOW_COPY_AND_ASSIGN(FieldTrialList);
};
« no previous file with comments | « no previous file | base/metrics/field_trial.cc » ('j') | base/metrics/field_trial.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698