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

Unified Diff: components/ukm/public/mojo_ukm_recorder.cc

Issue 2882353002: Implement Ukm Mojo interface. (Closed)
Patch Set: Move example to comment 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 side-by-side diff with in-line comments
Download patch
Index: components/ukm/public/mojo_ukm_recorder.cc
diff --git a/components/ukm/public/mojo_ukm_recorder.cc b/components/ukm/public/mojo_ukm_recorder.cc
new file mode 100644
index 0000000000000000000000000000000000000000..fe0017e26935fd017fd4f3b27155e269d1637902
--- /dev/null
+++ b/components/ukm/public/mojo_ukm_recorder.cc
@@ -0,0 +1,24 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/ukm/public/mojo_ukm_recorder.h"
+
+#include "base/memory/ptr_util.h"
+
+namespace ukm {
+
+MojoUkmRecorder::MojoUkmRecorder(mojom::UkmRecorderInterfacePtr interface)
+ : interface_(std::move(interface)){};
oystein (OOO til 10th of July) 2017/05/17 01:16:18 nit: space before {}
Steven Holte 2017/05/17 17:40:16 Done.
+MojoUkmRecorder::~MojoUkmRecorder() = default;
+
+void MojoUkmRecorder::UpdateSourceURL(SourceId source_id, const GURL& url) {
+ DCHECK(false);
+ // Not implemented yet, currently a no-op.
+}
+
+void MojoUkmRecorder::AddEntry(mojom::UkmEntryPtr entry) {
+ interface_->AddEntry(std::move(entry));
+}
+
+} // namespace ukm

Powered by Google App Engine
This is Rietveld 408576698