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

Unified Diff: components/ukm/ukm_entry.cc

Issue 2893943004: Refactor UKM interface for mojo-ification (Closed)
Patch Set: Fixed contextualsearch 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
« no previous file with comments | « components/ukm/ukm_entry.h ('k') | components/ukm/ukm_entry_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ukm/ukm_entry.cc
diff --git a/components/ukm/ukm_entry.cc b/components/ukm/ukm_entry.cc
deleted file mode 100644
index 88b724c06f6abee81c98dc38a4f0a329a0050b42..0000000000000000000000000000000000000000
--- a/components/ukm/ukm_entry.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// 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/ukm_entry.h"
-
-#include "base/metrics/metrics_hashes.h"
-#include "components/metrics/proto/ukm/entry.pb.h"
-#include "components/ukm/ukm_source.h"
-
-namespace ukm {
-
-UkmEntry::UkmEntry(int32_t source_id, const char* event_name)
- : source_id_(source_id), event_hash_(base::HashMetricName(event_name)) {}
-
-UkmEntry::~UkmEntry() {}
-
-void UkmEntry::PopulateProto(Entry* proto_entry) const {
- DCHECK(!proto_entry->has_source_id());
- DCHECK(!proto_entry->has_event_hash());
-
- proto_entry->set_source_id(source_id_);
- proto_entry->set_event_hash(event_hash_);
- for (auto& metric : metrics_) {
- Entry::Metric* proto_metric = proto_entry->add_metrics();
- proto_metric->set_metric_hash(std::get<0>(metric));
- proto_metric->set_value(std::get<1>(metric));
- }
-}
-
-} // namespace ukm
« no previous file with comments | « components/ukm/ukm_entry.h ('k') | components/ukm/ukm_entry_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698