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

Unified Diff: components/ukm/ukm_entry_builder.h

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.cc ('k') | components/ukm/ukm_entry_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ukm/ukm_entry_builder.h
diff --git a/components/ukm/ukm_entry_builder.h b/components/ukm/ukm_entry_builder.h
deleted file mode 100644
index e2400ee5cb5afe47e7022ad343735a6a0dc58225..0000000000000000000000000000000000000000
--- a/components/ukm/ukm_entry_builder.h
+++ /dev/null
@@ -1,54 +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.
-
-#ifndef COMPONENTS_UKM_UKM_ENTRY_BUILDER_H
-#define COMPONENTS_UKM_UKM_ENTRY_BUILDER_H
-
-#include <string>
-
-#include "base/macros.h"
-#include "components/ukm/ukm_service.h"
-
-namespace ukm {
-
-class UkmEntry;
-class UkmService;
-
-// The builder that builds UkmEntry and adds it to UkmService.
-// The example usage is:
-//
-// {
-// unique_ptr<UkmEntryBuilder> builder =
-// ukm_service->GetEntryBuilder(source_id, "PageLoad");
-// builder->AddMetric("NavigationStart", navigation_start_time);
-// builder->AddMetric("ResponseStart", response_start_time);
-// builder->AddMetric("FirstPaint", first_paint_time);
-// builder->AddMetric("FirstContentfulPaint", fcp_time);
-// }
-//
-// When there exists an added metric, the builder will automatically add the
-// UkmEntry to UkmService upon destruction when going out of scope.
-class UkmEntryBuilder {
- public:
- // Add metric to the entry. A metric contains a metric name and value.
- void AddMetric(const char* metric_name, int64_t value);
-
- ~UkmEntryBuilder();
-
- private:
- friend class UkmService;
-
- UkmEntryBuilder(const UkmService::AddEntryCallback& callback,
- int32_t source_id,
- const char* event_name);
-
- UkmService::AddEntryCallback add_entry_callback_;
- std::unique_ptr<UkmEntry> entry_;
-
- DISALLOW_COPY_AND_ASSIGN(UkmEntryBuilder);
-};
-
-} // namespace ukm
-
-#endif // COMPONENTS_UKM_UKM_ENTRY_BUILDER_H
« no previous file with comments | « components/ukm/ukm_entry.cc ('k') | components/ukm/ukm_entry_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698