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

Side by Side Diff: base/metrics/field_trial.h

Issue 17945002: Make --force-fieldtrials not activate them in the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/metrics/field_trial.cc » ('j') | base/metrics/field_trial.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // FieldTrial is a class for handling details of statistical experiments 5 // FieldTrial is a class for handling details of statistical experiments
6 // performed by actual users in the field (i.e., in a shipped or beta product). 6 // performed by actual users in the field (i.e., in a shipped or beta product).
7 // All code is called exclusively on the UI thread currently. 7 // All code is called exclusively on the UI thread currently.
8 // 8 //
9 // The simplest example is an experiment to see whether one of two options 9 // The simplest example is an experiment to see whether one of two options
10 // produces "better" results across our user population. In that scenario, UMA 10 // produces "better" results across our user population. In that scenario, UMA
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 // not been disabled. 385 // not been disabled.
386 static void GetActiveFieldTrialGroups( 386 static void GetActiveFieldTrialGroups(
387 FieldTrial::ActiveGroups* active_groups); 387 FieldTrial::ActiveGroups* active_groups);
388 388
389 // Use a state string (re: StatesToString()) to augment the current list of 389 // Use a state string (re: StatesToString()) to augment the current list of
390 // field trials to include the supplied trials, and using a 100% probability 390 // field trials to include the supplied trials, and using a 100% probability
391 // for each trial, force them to have the same group string. This is commonly 391 // for each trial, force them to have the same group string. This is commonly
392 // used in a non-browser process, to carry randomly selected state in a 392 // used in a non-browser process, to carry randomly selected state in a
393 // browser process into this non-browser process, but could also be invoked 393 // browser process into this non-browser process, but could also be invoked
394 // through a command line argument to the browser process. The created field 394 // through a command line argument to the browser process. The created field
395 // trials are marked as "used" for the purposes of active trial reporting. 395 // trials are marked as "used" for the purposes of active trial reporting if
396 static bool CreateTrialsFromString(const std::string& prior_trials); 396 // |activate_trials| is true.
397 static bool CreateTrialsFromString(const std::string& prior_trials,
398 bool activate_trials);
Ilya Sherman 2013/06/28 00:58:07 nit: Please define an enumerated constant for this
Alexei Svitkine (slow) 2013/06/28 17:05:15 Done.
397 399
398 // Create a FieldTrial with the given |name| and using 100% probability for 400 // Create a FieldTrial with the given |name| and using 100% probability for
399 // the FieldTrial, force FieldTrial to have the same group string as 401 // the FieldTrial, force FieldTrial to have the same group string as
400 // |group_name|. This is commonly used in a non-browser process, to carry 402 // |group_name|. This is commonly used in a non-browser process, to carry
401 // randomly selected state in a browser process into this non-browser process. 403 // randomly selected state in a browser process into this non-browser process.
402 // It returns NULL if there is a FieldTrial that is already registered with 404 // It returns NULL if there is a FieldTrial that is already registered with
403 // the same |name| but has different finalized group string (|group_name|). 405 // the same |name| but has different finalized group string (|group_name|).
404 static FieldTrial* CreateFieldTrial(const std::string& name, 406 static FieldTrial* CreateFieldTrial(const std::string& name,
405 const std::string& group_name); 407 const std::string& group_name);
406 408
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 455
454 // List of observers to be notified when a group is selected for a FieldTrial. 456 // List of observers to be notified when a group is selected for a FieldTrial.
455 scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_; 457 scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_;
456 458
457 DISALLOW_COPY_AND_ASSIGN(FieldTrialList); 459 DISALLOW_COPY_AND_ASSIGN(FieldTrialList);
458 }; 460 };
459 461
460 } // namespace base 462 } // namespace base
461 463
462 #endif // BASE_METRICS_FIELD_TRIAL_H_ 464 #endif // BASE_METRICS_FIELD_TRIAL_H_
OLDNEW
« 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