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

Side by Side Diff: components/ukm/ukm_service.h

Issue 2855053002: Allow empty UKM entries to be recorded. (Closed)
Patch Set: Fix test 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 unified diff | Download patch
« no previous file with comments | « components/ukm/ukm_entry_builder.cc ('k') | components/ukm/ukm_service_unittest.cc » ('j') | 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 COMPONENTS_UKM_UKM_SERVICE_H_ 5 #ifndef COMPONENTS_UKM_UKM_SERVICE_H_
6 #define COMPONENTS_UKM_UKM_SERVICE_H_ 6 #define COMPONENTS_UKM_UKM_SERVICE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 const std::vector<std::unique_ptr<UkmEntry>>& entries_for_testing() const { 115 const std::vector<std::unique_ptr<UkmEntry>>& entries_for_testing() const {
116 return entries_; 116 return entries_;
117 } 117 }
118 118
119 private: 119 private:
120 friend autofill::AutofillMetrics; 120 friend autofill::AutofillMetrics;
121 friend payments::JourneyLogger; 121 friend payments::JourneyLogger;
122 friend PluginInfoMessageFilter; 122 friend PluginInfoMessageFilter;
123 friend UkmPageLoadMetricsObserver; 123 friend UkmPageLoadMetricsObserver;
124 friend translate::TranslateRankerImpl; 124 friend translate::TranslateRankerImpl;
125 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, AddEntryOnlyWithNonEmptyMetrics); 125 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, AddEntryWithEmptyMetrics);
126 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, EntryBuilderAndSerialization); 126 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, EntryBuilderAndSerialization);
127 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, 127 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest,
128 LogsUploadedOnlyWhenHavingSourcesOrEntries); 128 LogsUploadedOnlyWhenHavingSourcesOrEntries);
129 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, MetricsProviderTest); 129 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, MetricsProviderTest);
130 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, PersistAndPurge); 130 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, PersistAndPurge);
131 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, WhitelistEntryTest); 131 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, WhitelistEntryTest);
132 132
133 // Get a new UkmEntryBuilder object for the specified source ID and event, 133 // Get a new UkmEntryBuilder object for the specified source ID and event,
134 // which can get metrics added to. 134 // which can get metrics added to.
135 // 135 //
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // Weak pointers factory used to post task on different threads. All weak 206 // Weak pointers factory used to post task on different threads. All weak
207 // pointers managed by this factory have the same lifetime as UkmService. 207 // pointers managed by this factory have the same lifetime as UkmService.
208 base::WeakPtrFactory<UkmService> self_ptr_factory_; 208 base::WeakPtrFactory<UkmService> self_ptr_factory_;
209 209
210 DISALLOW_COPY_AND_ASSIGN(UkmService); 210 DISALLOW_COPY_AND_ASSIGN(UkmService);
211 }; 211 };
212 212
213 } // namespace ukm 213 } // namespace ukm
214 214
215 #endif // COMPONENTS_UKM_UKM_SERVICE_H_ 215 #endif // COMPONENTS_UKM_UKM_SERVICE_H_
OLDNEW
« no previous file with comments | « components/ukm/ukm_entry_builder.cc ('k') | components/ukm/ukm_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698