| 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 CHROME_BROWSER_NET_CERTIFICATE_ERROR_REPORTER_H_ | 5 #ifndef CHROME_BROWSER_NET_CERTIFICATE_ERROR_REPORTER_H_ |
| 6 #define CHROME_BROWSER_NET_CERTIFICATE_ERROR_REPORTER_H_ | 6 #define CHROME_BROWSER_NET_CERTIFICATE_ERROR_REPORTER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "net/url_request/url_request.h" | 13 #include "net/url_request/url_request.h" |
| 14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 15 | 15 |
| 16 namespace net { | 16 namespace net { |
| 17 class URLRequestContext; | 17 class URLRequestContext; |
| 18 class SSLInfo; | 18 class SSLInfo; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace chrome_browser_net { | 21 namespace chrome_browser_net { |
| 22 | 22 |
| 23 class CertLoggerRequest; | 23 class CertLoggerRequest; |
| 24 class EncryptedCertLoggerRequest; | 24 class EncryptedCertLoggerRequest; |
| 25 | 25 |
| 26 // Constants for the Finch trial that controls whether the |
| 27 // CertificateErrorReporter supports HTTP uploads. |
| 28 extern const char kHttpCertificateUploadExperiment[]; |
| 29 extern const char kHttpCertificateUploadGroup[]; |
| 30 |
| 26 // Provides functionality for sending reports about invalid SSL | 31 // Provides functionality for sending reports about invalid SSL |
| 27 // certificate chains to a report collection server. | 32 // certificate chains to a report collection server. |
| 28 class CertificateErrorReporter : public net::URLRequest::Delegate { | 33 class CertificateErrorReporter : public net::URLRequest::Delegate { |
| 29 public: | 34 public: |
| 30 // These represent the types of reports that can be sent. | 35 // These represent the types of reports that can be sent. |
| 31 enum ReportType { | 36 enum ReportType { |
| 32 // A report of a certificate chain that failed a certificate pinning | 37 // A report of a certificate chain that failed a certificate pinning |
| 33 // check. | 38 // check. |
| 34 REPORT_TYPE_PINNING_VIOLATION, | 39 REPORT_TYPE_PINNING_VIOLATION, |
| 35 // A report for an invalid certificate chain that is being sent for | 40 // A report for an invalid certificate chain that is being sent for |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 124 |
| 120 const uint8* server_public_key_; | 125 const uint8* server_public_key_; |
| 121 const uint32 server_public_key_version_; | 126 const uint32 server_public_key_version_; |
| 122 | 127 |
| 123 DISALLOW_COPY_AND_ASSIGN(CertificateErrorReporter); | 128 DISALLOW_COPY_AND_ASSIGN(CertificateErrorReporter); |
| 124 }; | 129 }; |
| 125 | 130 |
| 126 } // namespace chrome_browser_net | 131 } // namespace chrome_browser_net |
| 127 | 132 |
| 128 #endif // CHROME_BROWSER_NET_CERTIFICATE_ERROR_REPORTER_H_ | 133 #endif // CHROME_BROWSER_NET_CERTIFICATE_ERROR_REPORTER_H_ |
| OLD | NEW |