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

Side by Side Diff: services/metrics/public/cpp/ukm_recorder.h

Issue 2924673004: Add UKM metric tracking for various page load metric observers. (Closed)
Patch Set: update Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/page_load_metrics/observers/ukm_page_load_metrics_observer_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_METRICS_PUBLIC_CPP_UKM_RECORDER_H_ 5 #ifndef SERVICES_METRICS_PUBLIC_CPP_UKM_RECORDER_H_
6 #define SERVICES_METRICS_PUBLIC_CPP_UKM_RECORDER_H_ 6 #define SERVICES_METRICS_PUBLIC_CPP_UKM_RECORDER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/feature_list.h" 13 #include "base/feature_list.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/threading/thread_checker.h" 15 #include "base/threading/thread_checker.h"
16 #include "services/metrics/public/cpp/metrics_export.h" 16 #include "services/metrics/public/cpp/metrics_export.h"
17 #include "services/metrics/public/cpp/ukm_entry_builder.h" 17 #include "services/metrics/public/cpp/ukm_entry_builder.h"
18 #include "services/metrics/public/interfaces/ukm_interface.mojom.h" 18 #include "services/metrics/public/interfaces/ukm_interface.mojom.h"
19 #include "url/gurl.h" 19 #include "url/gurl.h"
20 20
21 class ContextualSearchRankerLoggerImpl; 21 class ContextualSearchRankerLoggerImpl;
22 class DocumentWritePageLoadMetricsObserver;
23 class FromGWSPageLoadMetricsLogger;
22 class PluginInfoMessageFilter; 24 class PluginInfoMessageFilter;
25 class ServiceWorkerPageLoadMetricsObserver;
26 class SubresourceFilterMetricsObserver;
23 class UkmPageLoadMetricsObserver; 27 class UkmPageLoadMetricsObserver;
24 28
25 namespace autofill { 29 namespace autofill {
26 class AutofillMetrics; 30 class AutofillMetrics;
27 } 31 }
28 32
29 namespace content { 33 namespace content {
30 class MediaInternals; 34 class MediaInternals;
31 class RenderFrameImpl; 35 class RenderFrameImpl;
32 class RenderWidgetHostLatencyTracker; 36 class RenderWidgetHostLatencyTracker;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // Update the URL on the source keyed to the given source ID. If the source 87 // Update the URL on the source keyed to the given source ID. If the source
84 // does not exist, it will create a new UkmSource object. 88 // does not exist, it will create a new UkmSource object.
85 virtual void UpdateSourceURL(SourceId source_id, const GURL& url) = 0; 89 virtual void UpdateSourceURL(SourceId source_id, const GURL& url) = 0;
86 90
87 private: 91 private:
88 friend autofill::AutofillMetrics; 92 friend autofill::AutofillMetrics;
89 friend payments::JourneyLogger; 93 friend payments::JourneyLogger;
90 friend ContextualSearchRankerLoggerImpl; 94 friend ContextualSearchRankerLoggerImpl;
91 friend PluginInfoMessageFilter; 95 friend PluginInfoMessageFilter;
92 friend UkmPageLoadMetricsObserver; 96 friend UkmPageLoadMetricsObserver;
97 friend DocumentWritePageLoadMetricsObserver;
98 friend FromGWSPageLoadMetricsLogger;
99 friend ServiceWorkerPageLoadMetricsObserver;
100 friend SubresourceFilterMetricsObserver;
93 friend translate::TranslateRankerImpl; 101 friend translate::TranslateRankerImpl;
94 friend TestRecordingHelper; 102 friend TestRecordingHelper;
95 friend UkmInterface; 103 friend UkmInterface;
96 friend content::MediaInternals; 104 friend content::MediaInternals;
97 friend content::RenderFrameImpl; 105 friend content::RenderFrameImpl;
98 friend content::RenderWidgetHostLatencyTracker; 106 friend content::RenderWidgetHostLatencyTracker;
99 friend password_manager::PasswordManagerMetricsRecorder; 107 friend password_manager::PasswordManagerMetricsRecorder;
100 friend password_manager::PasswordFormMetricsRecorder; 108 friend password_manager::PasswordFormMetricsRecorder;
101 friend resource_coordinator::CoordinationUnitManager; 109 friend resource_coordinator::CoordinationUnitManager;
102 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, AddEntryWithEmptyMetrics); 110 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, AddEntryWithEmptyMetrics);
(...skipping 16 matching lines...) Expand all
119 private: 127 private:
120 // Add an entry to the UkmEntry list. 128 // Add an entry to the UkmEntry list.
121 virtual void AddEntry(mojom::UkmEntryPtr entry) = 0; 129 virtual void AddEntry(mojom::UkmEntryPtr entry) = 0;
122 130
123 DISALLOW_COPY_AND_ASSIGN(UkmRecorder); 131 DISALLOW_COPY_AND_ASSIGN(UkmRecorder);
124 }; 132 };
125 133
126 } // namespace ukm 134 } // namespace ukm
127 135
128 #endif // SERVICES_METRICS_PUBLIC_CPP_UKM_RECORDER_H_ 136 #endif // SERVICES_METRICS_PUBLIC_CPP_UKM_RECORDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/page_load_metrics/observers/ukm_page_load_metrics_observer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698