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" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 void AddObserver(ReportingObserver* observer); | 66 void AddObserver(ReportingObserver* observer); |
67 void RemoveObserver(ReportingObserver* observer); | 67 void RemoveObserver(ReportingObserver* observer); |
68 | 68 |
69 void NotifyCacheUpdated(); | 69 void NotifyCacheUpdated(); |
70 | 70 |
71 protected: | 71 protected: |
72 ReportingContext(const ReportingPolicy& policy, | 72 ReportingContext(const ReportingPolicy& policy, |
73 std::unique_ptr<base::Clock> clock, | 73 std::unique_ptr<base::Clock> clock, |
74 std::unique_ptr<base::TickClock> tick_clock, | 74 std::unique_ptr<base::TickClock> tick_clock, |
75 std::unique_ptr<ReportingUploader> uploader); | 75 std::unique_ptr<ReportingUploader> uploader, |
| 76 std::unique_ptr<ReportingDelegate> delegate); |
76 | 77 |
77 private: | 78 private: |
78 ReportingPolicy policy_; | 79 ReportingPolicy policy_; |
79 | 80 |
80 std::unique_ptr<base::Clock> clock_; | 81 std::unique_ptr<base::Clock> clock_; |
81 std::unique_ptr<base::TickClock> tick_clock_; | 82 std::unique_ptr<base::TickClock> tick_clock_; |
82 std::unique_ptr<ReportingUploader> uploader_; | 83 std::unique_ptr<ReportingUploader> uploader_; |
83 | 84 |
84 base::ObserverList<ReportingObserver, /* check_empty= */ true> observers_; | 85 base::ObserverList<ReportingObserver, /* check_empty= */ true> observers_; |
85 | 86 |
(...skipping 19 matching lines...) Expand all Loading... |
105 | 106 |
106 // |browsing_data_remover_| must come after |cache_|. | 107 // |browsing_data_remover_| must come after |cache_|. |
107 std::unique_ptr<ReportingBrowsingDataRemover> browsing_data_remover_; | 108 std::unique_ptr<ReportingBrowsingDataRemover> browsing_data_remover_; |
108 | 109 |
109 DISALLOW_COPY_AND_ASSIGN(ReportingContext); | 110 DISALLOW_COPY_AND_ASSIGN(ReportingContext); |
110 }; | 111 }; |
111 | 112 |
112 } // namespace net | 113 } // namespace net |
113 | 114 |
114 #endif // NET_REPORTING_REPORTING_CONTEXT_H_ | 115 #endif // NET_REPORTING_REPORTING_CONTEXT_H_ |
OLD | NEW |