Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: content/browser/field_trial_recorder.cc

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "content/browser/field_trial_recorder.h" 5 #include "content/browser/field_trial_recorder.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "mojo/public/cpp/bindings/strong_binding.h" 9 #include "mojo/public/cpp/bindings/strong_binding.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 FieldTrialRecorder::FieldTrialRecorder() = default; 13 FieldTrialRecorder::FieldTrialRecorder() = default;
14 14
15 FieldTrialRecorder::~FieldTrialRecorder() = default; 15 FieldTrialRecorder::~FieldTrialRecorder() = default;
16 16
17 // static 17 // static
18 void FieldTrialRecorder::Create(mojom::FieldTrialRecorderRequest request) { 18 void FieldTrialRecorder::Create(
19 const service_manager::BindSourceInfo& source_info,
20 mojom::FieldTrialRecorderRequest request) {
19 mojo::MakeStrongBinding(base::MakeUnique<FieldTrialRecorder>(), 21 mojo::MakeStrongBinding(base::MakeUnique<FieldTrialRecorder>(),
20 std::move(request)); 22 std::move(request));
21 } 23 }
22 24
23 void FieldTrialRecorder::FieldTrialActivated(const std::string& trial_name) { 25 void FieldTrialRecorder::FieldTrialActivated(const std::string& trial_name) {
24 DCHECK(thread_checker_.CalledOnValidThread()); 26 DCHECK(thread_checker_.CalledOnValidThread());
25 // Activate the trial in the browser process to match its state in the 27 // Activate the trial in the browser process to match its state in the
26 // renderer. This is done by calling FindFullName which finalizes the group 28 // renderer. This is done by calling FindFullName which finalizes the group
27 // and activates the trial. 29 // and activates the trial.
28 base::FieldTrialList::FindFullName(trial_name); 30 base::FieldTrialList::FindFullName(trial_name);
29 } 31 }
30 32
31 } // namespce content 33 } // namespce content
OLDNEW
« no previous file with comments | « content/browser/field_trial_recorder.h ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698