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

Side by Side Diff: components/ukm/ukm_interface.cc

Issue 2882353002: Implement Ukm Mojo interface. (Closed)
Patch Set: Fix nits 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
« no previous file with comments | « components/ukm/ukm_interface.h ('k') | content/renderer/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 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 "components/ukm/ukm_interface.h"
6
7 #include "base/memory/ptr_util.h"
8 #include "components/ukm/public/ukm_recorder.h"
9 #include "mojo/public/cpp/bindings/strong_binding.h"
10
11 namespace ukm {
12
13 UkmInterface::UkmInterface(UkmRecorder* ukm_recorder)
14 : ukm_recorder_(ukm_recorder) {}
15
16 UkmInterface::~UkmInterface() = default;
17
18 // static
19 void UkmInterface::Create(UkmRecorder* ukm_recorder,
20 const service_manager::BindSourceInfo& source_info,
21 mojom::UkmRecorderInterfaceRequest request) {
22 mojo::MakeStrongBinding(base::MakeUnique<UkmInterface>(ukm_recorder),
23 std::move(request));
24 }
25
26 void UkmInterface::AddEntry(mojom::UkmEntryPtr ukm_entry) {
27 ukm_recorder_->AddEntry(std::move(ukm_entry));
28 }
29
30 } // namespace ukm
OLDNEW
« no previous file with comments | « components/ukm/ukm_interface.h ('k') | content/renderer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698