| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_NET_CHROME_FRAUDULENT_CERTIFICATE_REPORTER_H_ |
| 6 #define CHROME_BROWSER_NET_CHROME_FRAUDULENT_CERTIFICATE_REPORTER_H_ | 6 #define CHROME_BROWSER_NET_CHROME_FRAUDULENT_CERTIFICATE_REPORTER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // net::URLRequest::Delegate | 40 // net::URLRequest::Delegate |
| 41 void OnResponseStarted(net::URLRequest* request) override; | 41 void OnResponseStarted(net::URLRequest* request) override; |
| 42 void OnReadCompleted(net::URLRequest* request, int bytes_read) override; | 42 void OnReadCompleted(net::URLRequest* request, int bytes_read) override; |
| 43 | 43 |
| 44 protected: | 44 protected: |
| 45 net::URLRequestContext* const request_context_; | 45 net::URLRequestContext* const request_context_; |
| 46 const GURL pinning_violation_upload_url_; | 46 const GURL pinning_violation_upload_url_; |
| 47 const GURL invalid_chain_upload_url_; | 47 const GURL invalid_chain_upload_url_; |
| 48 | 48 |
| 49 static std::string BuildReport( |
| 50 ChromeFraudulentCertificateReporter::ReportType type, |
| 51 const std::string& hostname, |
| 52 const net::SSLInfo& ssl_info); |
| 53 |
| 49 private: | 54 private: |
| 50 // Performs post-report cleanup. | 55 // Performs post-report cleanup. |
| 51 void RequestComplete(net::URLRequest* request); | 56 void RequestComplete(net::URLRequest* request); |
| 52 | 57 |
| 53 // Owns the contained requests. | 58 // Owns the contained requests. |
| 54 std::set<net::URLRequest*> inflight_requests_; | 59 std::set<net::URLRequest*> inflight_requests_; |
| 55 | 60 |
| 56 DISALLOW_COPY_AND_ASSIGN(ChromeFraudulentCertificateReporter); | 61 DISALLOW_COPY_AND_ASSIGN(ChromeFraudulentCertificateReporter); |
| 57 }; | 62 }; |
| 58 | 63 |
| 59 } // namespace chrome_browser_net | 64 } // namespace chrome_browser_net |
| 60 | 65 |
| 61 #endif // CHROME_BROWSER_NET_CHROME_FRAUDULENT_CERTIFICATE_REPORTER_H_ | 66 #endif // CHROME_BROWSER_NET_CHROME_FRAUDULENT_CERTIFICATE_REPORTER_H_ |
| OLD | NEW |