OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 // provided in the constructor. Failed reports will be added to the retry | 119 // provided in the constructor. Failed reports will be added to the retry |
120 // list. | 120 // list. |
121 void SendPending(); | 121 void SendPending(); |
122 | 122 |
123 // Getter and setters for testing: | 123 // Getter and setters for testing: |
124 size_t inflight_report_count_for_testing() const; | 124 size_t inflight_report_count_for_testing() const; |
125 BoundedReportList* GetQueueForTesting() const; | 125 BoundedReportList* GetQueueForTesting() const; |
126 | 126 |
127 private: | 127 private: |
128 void SendInternal(const Report& report); | 128 void SendInternal(const Report& report); |
129 void ErrorCallback(int report_id, const GURL& url, int error); | 129 void ErrorCallback(int report_id, |
130 const GURL& url, | |
131 int error, | |
eroman
2017/04/26 22:52:28
I suggested updating this to "net_error" to make i
meacer
2017/04/27 00:56:41
Done.
| |
132 int http_response_code); | |
130 void SuccessCallback(int report_id); | 133 void SuccessCallback(int report_id); |
131 | 134 |
132 std::unique_ptr<certificate_reporting::ErrorReporter> error_reporter_; | 135 std::unique_ptr<certificate_reporting::ErrorReporter> error_reporter_; |
133 std::unique_ptr<BoundedReportList> retry_list_; | 136 std::unique_ptr<BoundedReportList> retry_list_; |
134 base::Clock* const clock_; | 137 base::Clock* const clock_; |
135 // Maximum age of a queued report. Reports older than this are discarded in | 138 // Maximum age of a queued report. Reports older than this are discarded in |
136 // the next SendPending() call. | 139 // the next SendPending() call. |
137 const base::TimeDelta report_ttl_; | 140 const base::TimeDelta report_ttl_; |
138 const bool retries_enabled_; | 141 const bool retries_enabled_; |
139 // Current report id, starting from zero and monotonically incrementing. | 142 // Current report id, starting from zero and monotonically incrementing. |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 base::Callback<void()> reset_callback_; | 236 base::Callback<void()> reset_callback_; |
234 | 237 |
235 // Encryption parameters. | 238 // Encryption parameters. |
236 uint8_t* server_public_key_; | 239 uint8_t* server_public_key_; |
237 uint32_t server_public_key_version_; | 240 uint32_t server_public_key_version_; |
238 | 241 |
239 DISALLOW_COPY_AND_ASSIGN(CertificateReportingService); | 242 DISALLOW_COPY_AND_ASSIGN(CertificateReportingService); |
240 }; | 243 }; |
241 | 244 |
242 #endif // CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_ | 245 #endif // CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_ |
OLD | NEW |