| 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 <set> | 10 #include <set> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // On some platforms (but not all), ErrorReporter can use | 61 // On some platforms (but not all), ErrorReporter can use |
| 62 // an HTTP endpoint to send encrypted extended reporting reports. On | 62 // an HTTP endpoint to send encrypted extended reporting reports. On |
| 63 // unsupported platforms, callers must send extended reporting reports | 63 // unsupported platforms, callers must send extended reporting reports |
| 64 // over SSL. | 64 // over SSL. |
| 65 virtual void SendExtendedReportingReport( | 65 virtual void SendExtendedReportingReport( |
| 66 const std::string& serialized_report); | 66 const std::string& serialized_report); |
| 67 | 67 |
| 68 // Whether sending reports over HTTP is supported. | 68 // Whether sending reports over HTTP is supported. |
| 69 static bool IsHttpUploadUrlSupported(); | 69 static bool IsHttpUploadUrlSupported(); |
| 70 | 70 |
| 71 #if defined(USE_OPENSSL) | |
| 72 // Used by tests. | 71 // Used by tests. |
| 73 static bool DecryptErrorReport( | 72 static bool DecryptErrorReport( |
| 74 const uint8_t server_private_key[32], | 73 const uint8_t server_private_key[32], |
| 75 const EncryptedCertLoggerRequest& encrypted_report, | 74 const EncryptedCertLoggerRequest& encrypted_report, |
| 76 std::string* decrypted_serialized_report); | 75 std::string* decrypted_serialized_report); |
| 77 #endif | |
| 78 | 76 |
| 79 private: | 77 private: |
| 80 scoped_ptr<net::CertificateReportSender> certificate_report_sender_; | 78 scoped_ptr<net::CertificateReportSender> certificate_report_sender_; |
| 81 | 79 |
| 82 const GURL upload_url_; | 80 const GURL upload_url_; |
| 83 | 81 |
| 84 const uint8_t* server_public_key_; | 82 const uint8_t* server_public_key_; |
| 85 const uint32_t server_public_key_version_; | 83 const uint32_t server_public_key_version_; |
| 86 | 84 |
| 87 DISALLOW_COPY_AND_ASSIGN(ErrorReporter); | 85 DISALLOW_COPY_AND_ASSIGN(ErrorReporter); |
| 88 }; | 86 }; |
| 89 | 87 |
| 90 } // namespace certificate_reporting | 88 } // namespace certificate_reporting |
| 91 | 89 |
| 92 #endif // COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORTER_H_ | 90 #endif // COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORTER_H_ |
| OLD | NEW |