• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2024 The Chromium Authors
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/metrics/dwa/dwa_entry_builder.h"
6 
7 #include "base/metrics/metrics_hashes.h"
8 
9 namespace dwa {
10 
DwaEntryBuilder(std::string_view event_name)11 DwaEntryBuilder::DwaEntryBuilder(std::string_view event_name)
12     : dwa::internal::DwaEntryBuilderBase(base::HashMetricName(event_name)) {}
13 
14 DwaEntryBuilder::~DwaEntryBuilder() = default;
15 
SetContent(std::string_view content)16 void DwaEntryBuilder::SetContent(std::string_view content) {
17   SetContentInternal(base::HashMetricName(content));
18 }
19 
SetMetric(std::string_view metric_name,int64_t value)20 void DwaEntryBuilder::SetMetric(std::string_view metric_name, int64_t value) {
21   SetMetricInternal(base::HashMetricName(metric_name), value);
22 }
23 
AddToStudiesOfInterest(std::string_view study_name)24 void DwaEntryBuilder::AddToStudiesOfInterest(std::string_view study_name) {
25   AddToStudiesOfInterestInternal(study_name);
26 }
27 
28 }  // namespace dwa
29