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

Unified Diff: components/ukm/ukm_service.h

Issue 2617883004: Initial UKMPageLoadMetricsObserver (Closed)
Patch Set: Created 3 years, 11 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/ukm_service.h
diff --git a/components/ukm/ukm_service.h b/components/ukm/ukm_service.h
index 79422c540e53503bd5f37961d2ec20da282010b3..d1188c1c2a8b6441c33cdfcfb9cd094e1cc4b0e2 100644
--- a/components/ukm/ukm_service.h
+++ b/components/ukm/ukm_service.h
@@ -23,6 +23,8 @@ class MetricsServiceClient;
namespace ukm {
+class UkmSource;
+
// Manages the generation and uploading of UKM reports.
// These reports contained fine grained performance metrics including URLs for
// top-level navigations.
@@ -42,6 +44,8 @@ class UkmService : public base::SupportsWeakPtr<UkmService> {
void EnableReporting();
void DisableReporting();
+ void RecordSource(std::unique_ptr<UkmSource> source);
+
// Registers the names of all of the preferences used by UkmService in
// the provided PrefRegistry.
static void RegisterPrefs(PrefRegistrySimple* registry);
@@ -91,6 +95,8 @@ class UkmService : public base::SupportsWeakPtr<UkmService> {
bool initialize_started_;
bool log_upload_in_progress_;
+ std::vector<std::unique_ptr<UkmSource>> sources_;
+
// Weak pointers factory used to post task on different threads. All weak
// pointers managed by this factory have the same lifetime as UkmService.
base::WeakPtrFactory<UkmService> self_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698