| 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_SSL_CHROME_EXPECT_CT_REPORTER_H_ | 5 #ifndef CHROME_BROWSER_SSL_CHROME_EXPECT_CT_REPORTER_H_ |
| 6 #define CHROME_BROWSER_SSL_CHROME_EXPECT_CT_REPORTER_H_ | 6 #define CHROME_BROWSER_SSL_CHROME_EXPECT_CT_REPORTER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // can cancel its requests. | 21 // can cancel its requests. |
| 22 class ChromeExpectCTReporter | 22 class ChromeExpectCTReporter |
| 23 : public net::TransportSecurityState::ExpectCTReporter { | 23 : public net::TransportSecurityState::ExpectCTReporter { |
| 24 public: | 24 public: |
| 25 explicit ChromeExpectCTReporter(net::URLRequestContext* request_context); | 25 explicit ChromeExpectCTReporter(net::URLRequestContext* request_context); |
| 26 ~ChromeExpectCTReporter() override; | 26 ~ChromeExpectCTReporter() override; |
| 27 | 27 |
| 28 // net::ExpectCTReporter: | 28 // net::ExpectCTReporter: |
| 29 void OnExpectCTFailed(const net::HostPortPair& host_port_pair, | 29 void OnExpectCTFailed(const net::HostPortPair& host_port_pair, |
| 30 const GURL& report_uri, | 30 const GURL& report_uri, |
| 31 base::Time expiration, |
| 31 const net::X509Certificate* validated_certificate_chain, | 32 const net::X509Certificate* validated_certificate_chain, |
| 32 const net::X509Certificate* served_certificate_chain, | 33 const net::X509Certificate* served_certificate_chain, |
| 33 const net::SignedCertificateTimestampAndStatusList& | 34 const net::SignedCertificateTimestampAndStatusList& |
| 34 signed_certificate_timestamps) override; | 35 signed_certificate_timestamps) override; |
| 35 | 36 |
| 36 private: | 37 private: |
| 37 FRIEND_TEST_ALL_PREFIXES(ChromeExpectCTReporterTest, FeatureDisabled); | 38 FRIEND_TEST_ALL_PREFIXES(ChromeExpectCTReporterTest, FeatureDisabled); |
| 38 FRIEND_TEST_ALL_PREFIXES(ChromeExpectCTReporterTest, EmptyReportURI); | 39 FRIEND_TEST_ALL_PREFIXES(ChromeExpectCTReporterTest, EmptyReportURI); |
| 39 FRIEND_TEST_ALL_PREFIXES(ChromeExpectCTReporterTest, SendReport); | 40 FRIEND_TEST_ALL_PREFIXES(ChromeExpectCTReporterTest, SendReport); |
| 40 | 41 |
| 41 std::unique_ptr<net::ReportSender> report_sender_; | 42 std::unique_ptr<net::ReportSender> report_sender_; |
| 42 | 43 |
| 43 DISALLOW_COPY_AND_ASSIGN(ChromeExpectCTReporter); | 44 DISALLOW_COPY_AND_ASSIGN(ChromeExpectCTReporter); |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 #endif // CHROME_BROWSER_SSL_CHROME_EXPECT_CT_REPORTER_H_ | 47 #endif // CHROME_BROWSER_SSL_CHROME_EXPECT_CT_REPORTER_H_ |
| OLD | NEW |