OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "base/metrics/field_trial_param_associator.h" | 5 #include "base/metrics/field_trial_param_associator.h" |
6 | 6 |
7 #include "base/metrics/field_trial.h" | 7 #include "base/metrics/field_trial.h" |
8 | 8 |
9 namespace base { | 9 namespace base { |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 const FieldTrialKey key(trial_name, group_name); | 60 const FieldTrialKey key(trial_name, group_name); |
61 if (!ContainsKey(field_trial_params_, key)) | 61 if (!ContainsKey(field_trial_params_, key)) |
62 return false; | 62 return false; |
63 | 63 |
64 *params = field_trial_params_[key]; | 64 *params = field_trial_params_[key]; |
65 return true; | 65 return true; |
66 } | 66 } |
67 | 67 |
68 void FieldTrialParamAssociator::ClearAllParamsForTesting() { | 68 void FieldTrialParamAssociator::ClearAllParamsForTesting() { |
69 AutoLock scoped_lock(lock_); | 69 { |
70 field_trial_params_.clear(); | 70 AutoLock scoped_lock(lock_); |
| 71 field_trial_params_.clear(); |
| 72 } |
71 FieldTrialList::ClearParamsFromSharedMemoryForTesting(); | 73 FieldTrialList::ClearParamsFromSharedMemoryForTesting(); |
72 } | 74 } |
73 | 75 |
74 void FieldTrialParamAssociator::ClearAllCachedParamsForTesting() { | 76 void FieldTrialParamAssociator::ClearAllCachedParamsForTesting() { |
75 AutoLock scoped_lock(lock_); | 77 AutoLock scoped_lock(lock_); |
76 field_trial_params_.clear(); | 78 field_trial_params_.clear(); |
77 } | 79 } |
78 | 80 |
79 } // namespace base | 81 } // namespace base |
OLD | NEW |