OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/field_trial_recorder.h" | |
6 | |
7 #include "base/memory/ptr_util.h" | |
8 #include "base/metrics/field_trial.h" | |
9 #include "mojo/public/cpp/bindings/strong_binding.h" | |
10 | |
11 FieldTrialRecorder::FieldTrialRecorder() = default; | |
12 | |
13 FieldTrialRecorder::~FieldTrialRecorder() = default; | |
14 | |
15 // static | |
16 void FieldTrialRecorder::Create( | |
17 chrome::mojom::FieldTrialRecorderRequest request) { | |
18 mojo::MakeStrongBinding(base::MakeUnique<FieldTrialRecorder>(), | |
19 std::move(request)); | |
20 } | |
21 | |
22 void FieldTrialRecorder::FieldTrialActivated(const std::string& trial_name) { | |
23 DCHECK(thread_checker_.CalledOnValidThread()); | |
24 // Activate the trial in the browser process to match its state in the | |
25 // renderer. This is done by calling FindFullName which finalizes the group | |
26 // and activates the trial. | |
27 base::FieldTrialList::FindFullName(trial_name); | |
28 } | |
OLD | NEW |