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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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, const GURL& url, int error); |
130 void SuccessCallback(int report_id); | 130 void SuccessCallback(int report_id, int response_code); |
eroman
2017/04/25 21:02:39
can you document what this means, or give it a mor
meacer
2017/04/26 22:27:06
Renamed to http_response_code and documented the c
| |
131 | 131 |
132 std::unique_ptr<certificate_reporting::ErrorReporter> error_reporter_; | 132 std::unique_ptr<certificate_reporting::ErrorReporter> error_reporter_; |
133 std::unique_ptr<BoundedReportList> retry_list_; | 133 std::unique_ptr<BoundedReportList> retry_list_; |
134 base::Clock* const clock_; | 134 base::Clock* const clock_; |
135 // Maximum age of a queued report. Reports older than this are discarded in | 135 // Maximum age of a queued report. Reports older than this are discarded in |
136 // the next SendPending() call. | 136 // the next SendPending() call. |
137 const base::TimeDelta report_ttl_; | 137 const base::TimeDelta report_ttl_; |
138 const bool retries_enabled_; | 138 const bool retries_enabled_; |
139 // Current report id, starting from zero and monotonically incrementing. | 139 // Current report id, starting from zero and monotonically incrementing. |
140 int current_report_id_; | 140 int current_report_id_; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 base::Callback<void()> reset_callback_; | 233 base::Callback<void()> reset_callback_; |
234 | 234 |
235 // Encryption parameters. | 235 // Encryption parameters. |
236 uint8_t* server_public_key_; | 236 uint8_t* server_public_key_; |
237 uint32_t server_public_key_version_; | 237 uint32_t server_public_key_version_; |
238 | 238 |
239 DISALLOW_COPY_AND_ASSIGN(CertificateReportingService); | 239 DISALLOW_COPY_AND_ASSIGN(CertificateReportingService); |
240 }; | 240 }; |
241 | 241 |
242 #endif // CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_ | 242 #endif // CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_ |
OLD | NEW |