| OLD | NEW |
| 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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 static void CreateFeaturesFromCommandLine( | 561 static void CreateFeaturesFromCommandLine( |
| 562 const base::CommandLine& command_line, | 562 const base::CommandLine& command_line, |
| 563 const char* enable_features_switch, | 563 const char* enable_features_switch, |
| 564 const char* disable_features_switch, | 564 const char* disable_features_switch, |
| 565 FeatureList* feature_list); | 565 FeatureList* feature_list); |
| 566 | 566 |
| 567 #if defined(OS_WIN) | 567 #if defined(OS_WIN) |
| 568 // On Windows, we need to explicitly pass down any handles to be inherited. | 568 // On Windows, we need to explicitly pass down any handles to be inherited. |
| 569 // This function adds the shared memory handle to field trial state to the | 569 // This function adds the shared memory handle to field trial state to the |
| 570 // list of handles to be inherited. | 570 // list of handles to be inherited. |
| 571 static void AppendFieldTrialHandleIfNeeded( | 571 static void AppendFieldTrialHandleIfNeeded(std::vector<HANDLE>* handles); |
| 572 base::HandlesToInheritVector* handles); | |
| 573 #endif | 572 #endif |
| 574 | 573 |
| 575 #if defined(OS_POSIX) && !defined(OS_NACL) | 574 #if defined(OS_POSIX) && !defined(OS_NACL) |
| 576 // On POSIX, we also need to explicitly pass down this file descriptor that | 575 // On POSIX, we also need to explicitly pass down this file descriptor that |
| 577 // should be shared with the child process. Returns an invalid handle if it | 576 // should be shared with the child process. Returns an invalid handle if it |
| 578 // was not initialized properly. | 577 // was not initialized properly. |
| 579 static base::SharedMemoryHandle GetFieldTrialHandle(); | 578 static base::SharedMemoryHandle GetFieldTrialHandle(); |
| 580 #endif | 579 #endif |
| 581 | 580 |
| 582 // Adds a switch to the command line containing the field trial state as a | 581 // Adds a switch to the command line containing the field trial state as a |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 | 755 |
| 757 // Tracks whether CreateTrialsFromCommandLine() has been called. | 756 // Tracks whether CreateTrialsFromCommandLine() has been called. |
| 758 bool create_trials_from_command_line_called_ = false; | 757 bool create_trials_from_command_line_called_ = false; |
| 759 | 758 |
| 760 DISALLOW_COPY_AND_ASSIGN(FieldTrialList); | 759 DISALLOW_COPY_AND_ASSIGN(FieldTrialList); |
| 761 }; | 760 }; |
| 762 | 761 |
| 763 } // namespace base | 762 } // namespace base |
| 764 | 763 |
| 765 #endif // BASE_METRICS_FIELD_TRIAL_H_ | 764 #endif // BASE_METRICS_FIELD_TRIAL_H_ |
| OLD | NEW |