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 NET_REPORTING_REPORTING_CONTEXT_H_ | 5 #ifndef NET_REPORTING_REPORTING_CONTEXT_H_ |
6 #define NET_REPORTING_REPORTING_CONTEXT_H_ | 6 #define NET_REPORTING_REPORTING_CONTEXT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "net/base/backoff_entry.h" | 12 #include "net/base/backoff_entry.h" |
13 #include "net/base/net_export.h" | 13 #include "net/base/net_export.h" |
14 #include "net/reporting/reporting_policy.h" | 14 #include "net/reporting/reporting_policy.h" |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class Clock; | 17 class Clock; |
18 class TickClock; | 18 class TickClock; |
19 } // namespace base | 19 } // namespace base |
20 | 20 |
21 namespace net { | 21 namespace net { |
22 | 22 |
23 class ReportingCache; | 23 class ReportingCache; |
24 class ReportingDelegate; | 24 class ReportingDelegate; |
25 class ReportingDeliveryAgent; | 25 class ReportingDeliveryAgent; |
26 class ReportingEndpointManager; | 26 class ReportingEndpointManager; |
27 class ReportingGarbageCollector; | 27 class ReportingGarbageCollector; |
| 28 class ReportingNetworkChangeObserver; |
28 class ReportingObserver; | 29 class ReportingObserver; |
29 class ReportingPersister; | 30 class ReportingPersister; |
30 class ReportingUploader; | 31 class ReportingUploader; |
31 class URLRequestContext; | 32 class URLRequestContext; |
32 | 33 |
33 // Contains the various internal classes that make up the Reporting system. | 34 // Contains the various internal classes that make up the Reporting system. |
34 // Wrapped by ReportingService, which provides the external interface. | 35 // Wrapped by ReportingService, which provides the external interface. |
35 class NET_EXPORT ReportingContext { | 36 class NET_EXPORT ReportingContext { |
36 public: | 37 public: |
37 static std::unique_ptr<ReportingContext> Create( | 38 static std::unique_ptr<ReportingContext> Create( |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // and |endpoint_manager_|. | 102 // and |endpoint_manager_|. |
102 std::unique_ptr<ReportingDeliveryAgent> delivery_agent_; | 103 std::unique_ptr<ReportingDeliveryAgent> delivery_agent_; |
103 | 104 |
104 // |persister_| must come after |delegate_|, |clock_|, |tick_clock_|, and | 105 // |persister_| must come after |delegate_|, |clock_|, |tick_clock_|, and |
105 // |cache_|. | 106 // |cache_|. |
106 std::unique_ptr<ReportingPersister> persister_; | 107 std::unique_ptr<ReportingPersister> persister_; |
107 | 108 |
108 // |garbage_collector_| must come after |tick_clock_| and |cache_|. | 109 // |garbage_collector_| must come after |tick_clock_| and |cache_|. |
109 std::unique_ptr<ReportingGarbageCollector> garbage_collector_; | 110 std::unique_ptr<ReportingGarbageCollector> garbage_collector_; |
110 | 111 |
| 112 // |network_change_observer_| must come after |cache_|. |
| 113 std::unique_ptr<ReportingNetworkChangeObserver> network_change_observer_; |
| 114 |
111 DISALLOW_COPY_AND_ASSIGN(ReportingContext); | 115 DISALLOW_COPY_AND_ASSIGN(ReportingContext); |
112 }; | 116 }; |
113 | 117 |
114 } // namespace net | 118 } // namespace net |
115 | 119 |
116 #endif // NET_REPORTING_REPORTING_CONTEXT_H_ | 120 #endif // NET_REPORTING_REPORTING_CONTEXT_H_ |
OLD | NEW |