| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |