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

Side by Side Diff: net/reporting/reporting_context.h

Issue 2829683004: Reporting: Plumb from //chrome/browser/browsing_data. (Closed)
Patch Set: Fix. 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
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 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 ReportingBrowsingDataRemover;
23 class ReportingCache; 24 class ReportingCache;
24 class ReportingDeliveryAgent; 25 class ReportingDeliveryAgent;
25 class ReportingEndpointManager; 26 class ReportingEndpointManager;
26 class ReportingGarbageCollector; 27 class ReportingGarbageCollector;
27 class ReportingNetworkChangeObserver; 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
(...skipping 14 matching lines...) Expand all
47 ReportingUploader* uploader() { return uploader_.get(); } 48 ReportingUploader* uploader() { return uploader_.get(); }
48 49
49 ReportingCache* cache() { return cache_.get(); } 50 ReportingCache* cache() { return cache_.get(); }
50 ReportingEndpointManager* endpoint_manager() { 51 ReportingEndpointManager* endpoint_manager() {
51 return endpoint_manager_.get(); 52 return endpoint_manager_.get();
52 } 53 }
53 ReportingDeliveryAgent* delivery_agent() { return delivery_agent_.get(); } 54 ReportingDeliveryAgent* delivery_agent() { return delivery_agent_.get(); }
54 ReportingGarbageCollector* garbage_collector() { 55 ReportingGarbageCollector* garbage_collector() {
55 return garbage_collector_.get(); 56 return garbage_collector_.get();
56 } 57 }
58 ReportingBrowsingDataRemover* browsing_data_remover() {
59 return browsing_data_remover_.get();
60 }
57 61
58 ReportingPersister* persister() { return persister_.get(); } 62 ReportingPersister* persister() { return persister_.get(); }
59 63
60 void AddObserver(ReportingObserver* observer); 64 void AddObserver(ReportingObserver* observer);
61 void RemoveObserver(ReportingObserver* observer); 65 void RemoveObserver(ReportingObserver* observer);
62 66
63 void NotifyCacheUpdated(); 67 void NotifyCacheUpdated();
64 68
65 protected: 69 protected:
66 ReportingContext(const ReportingPolicy& policy, 70 ReportingContext(const ReportingPolicy& policy,
(...skipping 21 matching lines...) Expand all
88 92
89 // |persister_| must come after |clock_|, |tick_clock_|, and |cache_|. 93 // |persister_| must come after |clock_|, |tick_clock_|, and |cache_|.
90 std::unique_ptr<ReportingPersister> persister_; 94 std::unique_ptr<ReportingPersister> persister_;
91 95
92 // |garbage_collector_| must come after |tick_clock_| and |cache_|. 96 // |garbage_collector_| must come after |tick_clock_| and |cache_|.
93 std::unique_ptr<ReportingGarbageCollector> garbage_collector_; 97 std::unique_ptr<ReportingGarbageCollector> garbage_collector_;
94 98
95 // |network_change_observer_| must come after |cache_|. 99 // |network_change_observer_| must come after |cache_|.
96 std::unique_ptr<ReportingNetworkChangeObserver> network_change_observer_; 100 std::unique_ptr<ReportingNetworkChangeObserver> network_change_observer_;
97 101
102 // |browsing_data_remover_| must come after |cache_|.
103 std::unique_ptr<ReportingBrowsingDataRemover> browsing_data_remover_;
104
98 DISALLOW_COPY_AND_ASSIGN(ReportingContext); 105 DISALLOW_COPY_AND_ASSIGN(ReportingContext);
99 }; 106 };
100 107
101 } // namespace net 108 } // namespace net
102 109
103 #endif // NET_REPORTING_REPORTING_CONTEXT_H_ 110 #endif // NET_REPORTING_REPORTING_CONTEXT_H_
OLDNEW
« no previous file with comments | « net/reporting/reporting_browsing_data_remover_unittest.cc ('k') | net/reporting/reporting_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698