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

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

Issue 1962623005: More instrumentation to diagnose an Android renderer crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix base_unittests Created 4 years, 7 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
« no previous file with comments | « no previous file | base/metrics/field_trial.cc » ('j') | no next file with comments »
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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 ~FieldTrialList(); 348 ~FieldTrialList();
349 349
350 // TODO(asvitkine): Temporary function to diagnose http://crbug.com/359406. 350 // TODO(asvitkine): Temporary function to diagnose http://crbug.com/359406.
351 // Remove when that bug is fixed. This enables using a global map that checks 351 // Remove when that bug is fixed. This enables using a global map that checks
352 // the state of field trials between possible FieldTrialList instances. If 352 // the state of field trials between possible FieldTrialList instances. If
353 // enabled, a CHECK will be hit if it's seen that a field trial is given a 353 // enabled, a CHECK will be hit if it's seen that a field trial is given a
354 // different state then what was specified to a renderer process launch 354 // different state then what was specified to a renderer process launch
355 // command line. 355 // command line.
356 static void EnableGlobalStateChecks(); 356 static void EnableGlobalStateChecks();
357 357
358 // TODO(asvitkine): Temporary function to diagnose http://crbug.com/359406.
359 // Remove when that bug is fixed. This returns a unique token generated during
360 // FieldTrialList construction. This is used to verify that this value stays
361 // consistent between renderer process invocation.
Nico 2016/05/09 20:48:11 invocationS?
Alexei Svitkine (slow) 2016/05/09 20:50:40 Done.
362 static int32_t GetDebugToken();
363
358 // Get a FieldTrial instance from the factory. 364 // Get a FieldTrial instance from the factory.
359 // 365 //
360 // |name| is used to register the instance with the FieldTrialList class, 366 // |name| is used to register the instance with the FieldTrialList class,
361 // and can be used to find the trial (only one trial can be present for each 367 // and can be used to find the trial (only one trial can be present for each
362 // name). |default_group_name| is the name of the default group which will 368 // name). |default_group_name| is the name of the default group which will
363 // be chosen if none of the subsequent appended groups get to be chosen. 369 // be chosen if none of the subsequent appended groups get to be chosen.
364 // |default_group_number| can receive the group number of the default group as 370 // |default_group_number| can receive the group number of the default group as
365 // AppendGroup returns the number of the subsequence groups. |trial_name| and 371 // AppendGroup returns the number of the subsequence groups. |trial_name| and
366 // |default_group_name| may not be empty but |default_group_number| can be 372 // |default_group_name| may not be empty but |default_group_number| can be
367 // NULL if the value is not needed. 373 // NULL if the value is not needed.
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 532
527 // List of observers to be notified when a group is selected for a FieldTrial. 533 // List of observers to be notified when a group is selected for a FieldTrial.
528 scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_; 534 scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_;
529 535
530 DISALLOW_COPY_AND_ASSIGN(FieldTrialList); 536 DISALLOW_COPY_AND_ASSIGN(FieldTrialList);
531 }; 537 };
532 538
533 } // namespace base 539 } // namespace base
534 540
535 #endif // BASE_METRICS_FIELD_TRIAL_H_ 541 #endif // BASE_METRICS_FIELD_TRIAL_H_
OLDNEW
« no previous file with comments | « no previous file | base/metrics/field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698