OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORTER_H_ | 5 #ifndef COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORTER_H_ |
6 #define COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORTER_H_ | 6 #define COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORTER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 12 matching lines...) Expand all Loading... |
23 namespace certificate_reporting { | 23 namespace certificate_reporting { |
24 | 24 |
25 class EncryptedCertLoggerRequest; | 25 class EncryptedCertLoggerRequest; |
26 | 26 |
27 // Provides functionality for sending reports about invalid SSL | 27 // Provides functionality for sending reports about invalid SSL |
28 // certificate chains to a report collection server. | 28 // certificate chains to a report collection server. |
29 class ErrorReporter { | 29 class ErrorReporter { |
30 public: | 30 public: |
31 // Creates a certificate error reporter that will send certificate | 31 // Creates a certificate error reporter that will send certificate |
32 // error reports to |upload_url|, using |request_context| as the | 32 // error reports to |upload_url|, using |request_context| as the |
33 // context for the reports. |cookies_preference| controls whether | 33 // context for the reports. |
34 // cookies will be sent along with the reports. | |
35 ErrorReporter(net::URLRequestContext* request_context, | 34 ErrorReporter(net::URLRequestContext* request_context, |
36 const GURL& upload_url, | 35 const GURL& upload_url); |
37 net::ReportSender::CookiesPreference cookies_preference); | |
38 | 36 |
39 // Allows tests to use a server public key with known private key and | 37 // Allows tests to use a server public key with known private key and |
40 // a mock ReportSender. |server_public_key| must outlive | 38 // a mock ReportSender. |server_public_key| must outlive |
41 // the ErrorReporter. | 39 // the ErrorReporter. |
42 ErrorReporter(const GURL& upload_url, | 40 ErrorReporter(const GURL& upload_url, |
43 const uint8_t server_public_key[/* 32 */], | 41 const uint8_t server_public_key[/* 32 */], |
44 const uint32_t server_public_key_version, | 42 const uint32_t server_public_key_version, |
45 std::unique_ptr<net::ReportSender> certificate_report_sender); | 43 std::unique_ptr<net::ReportSender> certificate_report_sender); |
46 | 44 |
47 virtual ~ErrorReporter(); | 45 virtual ~ErrorReporter(); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 86 |
89 const uint8_t* server_public_key_; | 87 const uint8_t* server_public_key_; |
90 const uint32_t server_public_key_version_; | 88 const uint32_t server_public_key_version_; |
91 | 89 |
92 DISALLOW_COPY_AND_ASSIGN(ErrorReporter); | 90 DISALLOW_COPY_AND_ASSIGN(ErrorReporter); |
93 }; | 91 }; |
94 | 92 |
95 } // namespace certificate_reporting | 93 } // namespace certificate_reporting |
96 | 94 |
97 #endif // COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORTER_H_ | 95 #endif // COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORTER_H_ |
OLD | NEW |