Chromium Code Reviews| 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 11 matching lines...) Expand all Loading... | |
| 22 | 22 |
| 23 class PluginInfoMessageFilter; | 23 class PluginInfoMessageFilter; |
| 24 class PrefRegistrySimple; | 24 class PrefRegistrySimple; |
| 25 class PrefService; | 25 class PrefService; |
| 26 class UkmPageLoadMetricsObserver; | 26 class UkmPageLoadMetricsObserver; |
| 27 | 27 |
| 28 namespace autofill { | 28 namespace autofill { |
| 29 class AutofillMetrics; | 29 class AutofillMetrics; |
| 30 } // namespace autofill | 30 } // namespace autofill |
| 31 | 31 |
| 32 namespace payments { | |
| 33 class JourneyLogger; | |
| 34 } // namespace payments | |
| 35 | |
| 32 namespace metrics { | 36 namespace metrics { |
| 33 class MetricsServiceClient; | 37 class MetricsServiceClient; |
| 34 } | 38 } |
| 35 | 39 |
| 36 namespace ukm { | 40 namespace ukm { |
| 37 | 41 |
| 38 class UkmEntry; | 42 class UkmEntry; |
| 39 class UkmEntryBuilder; | 43 class UkmEntryBuilder; |
| 40 class UkmSource; | 44 class UkmSource; |
| 41 | 45 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 const { | 107 const { |
| 104 return sources_; | 108 return sources_; |
| 105 } | 109 } |
| 106 | 110 |
| 107 const std::vector<std::unique_ptr<UkmEntry>>& entries_for_testing() const { | 111 const std::vector<std::unique_ptr<UkmEntry>>& entries_for_testing() const { |
| 108 return entries_; | 112 return entries_; |
| 109 } | 113 } |
| 110 | 114 |
| 111 private: | 115 private: |
| 112 friend autofill::AutofillMetrics; | 116 friend autofill::AutofillMetrics; |
| 117 friend payments::JourneyLogger; | |
|
please use gerrit instead
2017/04/10 19:20:03
Why are you reaching into the privates of ukm serv
sebsg
2017/04/10 19:49:53
Love your wording :P
I need to be friends to be a
| |
| 113 friend PluginInfoMessageFilter; | 118 friend PluginInfoMessageFilter; |
| 114 friend UkmPageLoadMetricsObserver; | 119 friend UkmPageLoadMetricsObserver; |
| 115 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, AddEntryOnlyWithNonEmptyMetrics); | 120 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, AddEntryOnlyWithNonEmptyMetrics); |
| 116 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, EntryBuilderAndSerialization); | 121 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, EntryBuilderAndSerialization); |
| 117 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, | 122 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, |
| 118 LogsUploadedOnlyWhenHavingSourcesOrEntries); | 123 LogsUploadedOnlyWhenHavingSourcesOrEntries); |
| 119 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, MetricsProviderTest); | 124 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, MetricsProviderTest); |
| 120 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, PersistAndPurge); | 125 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, PersistAndPurge); |
| 121 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, WhitelistEntryTest); | 126 FRIEND_TEST_ALL_PREFIXES(UkmServiceTest, WhitelistEntryTest); |
| 122 | 127 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 196 // Weak pointers factory used to post task on different threads. All weak | 201 // Weak pointers factory used to post task on different threads. All weak |
| 197 // pointers managed by this factory have the same lifetime as UkmService. | 202 // pointers managed by this factory have the same lifetime as UkmService. |
| 198 base::WeakPtrFactory<UkmService> self_ptr_factory_; | 203 base::WeakPtrFactory<UkmService> self_ptr_factory_; |
| 199 | 204 |
| 200 DISALLOW_COPY_AND_ASSIGN(UkmService); | 205 DISALLOW_COPY_AND_ASSIGN(UkmService); |
| 201 }; | 206 }; |
| 202 | 207 |
| 203 } // namespace ukm | 208 } // namespace ukm |
| 204 | 209 |
| 205 #endif // COMPONENTS_UKM_UKM_SERVICE_H_ | 210 #endif // COMPONENTS_UKM_UKM_SERVICE_H_ |
| OLD | NEW |