| OLD | NEW |
| 1 // Copyright (c) 2011 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_CHROME_FRAUDULENT_CERTIFICATE_REPORTER_H_ | 5 #ifndef CHROME_BROWSER_SSL_CHROME_FRAUDULENT_CERTIFICATE_REPORTER_H_ |
| 6 #define CHROME_BROWSER_NET_CHROME_FRAUDULENT_CERTIFICATE_REPORTER_H_ | 6 #define CHROME_BROWSER_SSL_CHROME_FRAUDULENT_CERTIFICATE_REPORTER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "net/url_request/fraudulent_certificate_reporter.h" | 12 #include "net/url_request/fraudulent_certificate_reporter.h" |
| 13 | 13 |
| 14 namespace chrome_browser_net { |
| 15 class CertificateErrorReporter; |
| 16 } // namespace chrome_browser_net |
| 17 |
| 14 namespace net { | 18 namespace net { |
| 15 class URLRequestContext; | 19 class URLRequestContext; |
| 16 } | 20 } // namespace net |
| 17 | 21 |
| 18 namespace chrome_browser_net { | 22 namespace chrome_browser_ssl { |
| 19 | |
| 20 class CertificateErrorReporter; | |
| 21 | 23 |
| 22 class ChromeFraudulentCertificateReporter | 24 class ChromeFraudulentCertificateReporter |
| 23 : public net::FraudulentCertificateReporter { | 25 : public net::FraudulentCertificateReporter { |
| 24 public: | 26 public: |
| 25 explicit ChromeFraudulentCertificateReporter( | 27 explicit ChromeFraudulentCertificateReporter( |
| 26 net::URLRequestContext* request_context); | 28 net::URLRequestContext* request_context); |
| 27 | 29 |
| 28 // Useful for tests to use a mock reporter. | 30 // Useful for tests to use a mock reporter. |
| 29 explicit ChromeFraudulentCertificateReporter( | 31 explicit ChromeFraudulentCertificateReporter(scoped_ptr< |
| 30 scoped_ptr<CertificateErrorReporter> certificate_reporter); | 32 chrome_browser_net::CertificateErrorReporter> certificate_reporter); |
| 31 | 33 |
| 32 ~ChromeFraudulentCertificateReporter() override; | 34 ~ChromeFraudulentCertificateReporter() override; |
| 33 | 35 |
| 34 // net::FraudulentCertificateReporter | 36 // net::FraudulentCertificateReporter |
| 35 void SendReport(const std::string& hostname, | 37 void SendReport(const std::string& hostname, |
| 36 const net::SSLInfo& ssl_info) override; | 38 const net::SSLInfo& ssl_info) override; |
| 37 | 39 |
| 38 private: | 40 private: |
| 39 scoped_ptr<CertificateErrorReporter> certificate_reporter_; | 41 scoped_ptr<chrome_browser_net::CertificateErrorReporter> |
| 42 certificate_reporter_; |
| 40 | 43 |
| 41 DISALLOW_COPY_AND_ASSIGN(ChromeFraudulentCertificateReporter); | 44 DISALLOW_COPY_AND_ASSIGN(ChromeFraudulentCertificateReporter); |
| 42 }; | 45 }; |
| 43 | 46 |
| 44 } // namespace chrome_browser_net | 47 } // namespace chrome_browser_ssl |
| 45 | 48 |
| 46 #endif // CHROME_BROWSER_NET_CHROME_FRAUDULENT_CERTIFICATE_REPORTER_H_ | 49 #endif // CHROME_BROWSER_SSL_CHROME_FRAUDULENT_CERTIFICATE_REPORTER_H_ |
| OLD | NEW |