| Index: base/metrics/field_trial.h
|
| diff --git a/base/metrics/field_trial.h b/base/metrics/field_trial.h
|
| index 34b9782bee0fe06c51abf1383c3d98c247c4a958..0c35bbfcec6a436694000d4ea8f524ad2c710460 100644
|
| --- a/base/metrics/field_trial.h
|
| +++ b/base/metrics/field_trial.h
|
| @@ -228,6 +228,8 @@ class BASE_EXPORT FieldTrial : public RefCounted<FieldTrial> {
|
|
|
| friend class RefCounted<FieldTrial>;
|
|
|
| + friend class FieldTrialParamAssociator;
|
| +
|
| // This is the group number of the 'default' group when a choice wasn't forced
|
| // by a call to FieldTrialList::CreateFieldTrial. It is kept private so that
|
| // consumers don't use it by mistake in cases where the group was forced.
|
| @@ -550,12 +552,22 @@ class BASE_EXPORT FieldTrialList {
|
| // Return the number of active field trials.
|
| static size_t GetFieldTrialCount();
|
|
|
| + // Gets the parameters for |field_trial| from shared memory and stores them in
|
| + // |params|.
|
| + static bool GetParamsFromSharedMemory(
|
| + FieldTrial* field_trial,
|
| + std::map<std::string, std::string>* params);
|
| +
|
| + // Clears all the params in the allocator.
|
| + static void ClearParamsFromSharedMemoryForTesting();
|
| +
|
| private:
|
| // Allow tests to access our innards for testing purposes.
|
| FRIEND_TEST_ALL_PREFIXES(FieldTrialListTest, InstantiateAllocator);
|
| FRIEND_TEST_ALL_PREFIXES(FieldTrialListTest, AddTrialsToAllocator);
|
| FRIEND_TEST_ALL_PREFIXES(FieldTrialListTest,
|
| DoNotAddSimulatedFieldTrialsToAllocator);
|
| + FRIEND_TEST_ALL_PREFIXES(FieldTrialListTest, AssociateFieldTrialParams);
|
|
|
| #if defined(OS_WIN)
|
| // Takes in |handle| that should have been retrieved from the command line and
|
| @@ -609,7 +621,7 @@ class BASE_EXPORT FieldTrialList {
|
| static bool used_without_global_;
|
|
|
| // Lock for access to registered_.
|
| - base::Lock lock_;
|
| + Lock lock_;
|
| RegistrationMap registered_;
|
|
|
| std::map<std::string, std::string> seen_states_;
|
|
|