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 #include "base/metrics/field_trial.h" | 5 #include "base/metrics/field_trial.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 command_line.GetSwitchValueASCII(disable_features_switch)); | 821 command_line.GetSwitchValueASCII(disable_features_switch)); |
822 } | 822 } |
823 | 823 |
824 feature_list->InitializeFromSharedMemory( | 824 feature_list->InitializeFromSharedMemory( |
825 global_->field_trial_allocator_.get()); | 825 global_->field_trial_allocator_.get()); |
826 } | 826 } |
827 | 827 |
828 #if defined(OS_WIN) | 828 #if defined(OS_WIN) |
829 // static | 829 // static |
830 void FieldTrialList::AppendFieldTrialHandleIfNeeded( | 830 void FieldTrialList::AppendFieldTrialHandleIfNeeded( |
831 HandlesToInheritVector* handles) { | 831 std::vector<HANDLE>* handles) { |
832 if (!global_) | 832 if (!global_) |
833 return; | 833 return; |
834 if (kUseSharedMemoryForFieldTrials) { | 834 if (kUseSharedMemoryForFieldTrials) { |
835 InstantiateFieldTrialAllocatorIfNeeded(); | 835 InstantiateFieldTrialAllocatorIfNeeded(); |
836 if (global_->readonly_allocator_handle_.IsValid()) | 836 if (global_->readonly_allocator_handle_.IsValid()) |
837 handles->push_back(global_->readonly_allocator_handle_.GetHandle()); | 837 handles->push_back(global_->readonly_allocator_handle_.GetHandle()); |
838 } | 838 } |
839 } | 839 } |
840 #endif | 840 #endif |
841 | 841 |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1408 return; | 1408 return; |
1409 } | 1409 } |
1410 AutoLock auto_lock(global_->lock_); | 1410 AutoLock auto_lock(global_->lock_); |
1411 CHECK(!global_->PreLockedFind(trial->trial_name())) << trial->trial_name(); | 1411 CHECK(!global_->PreLockedFind(trial->trial_name())) << trial->trial_name(); |
1412 trial->AddRef(); | 1412 trial->AddRef(); |
1413 trial->SetTrialRegistered(); | 1413 trial->SetTrialRegistered(); |
1414 global_->registered_[trial->trial_name()] = trial; | 1414 global_->registered_[trial->trial_name()] = trial; |
1415 } | 1415 } |
1416 | 1416 |
1417 } // namespace base | 1417 } // namespace base |
OLD | NEW |