Chromium Code Reviews| 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 |
| 11 #include "net/url_request/fraudulent_certificate_reporter.h" | 11 #include "net/url_request/fraudulent_certificate_reporter.h" |
| 12 #include "net/url_request/url_request.h" | 12 #include "net/url_request/url_request.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 class URLRequestContext; | 15 class URLRequestContext; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace chrome_browser_net { | 18 namespace chrome_browser_net { |
| 19 | 19 |
| 20 class EncryptedCertLoggerRequest; | |
| 21 | |
| 20 class ChromeFraudulentCertificateReporter | 22 class ChromeFraudulentCertificateReporter |
| 21 : public net::FraudulentCertificateReporter, | 23 : public net::FraudulentCertificateReporter, |
| 22 public net::URLRequest::Delegate { | 24 public net::URLRequest::Delegate { |
| 23 public: | 25 public: |
| 24 explicit ChromeFraudulentCertificateReporter( | 26 explicit ChromeFraudulentCertificateReporter( |
| 25 net::URLRequestContext* request_context); | 27 net::URLRequestContext* request_context); |
| 26 | 28 |
| 27 ~ChromeFraudulentCertificateReporter() override; | 29 ~ChromeFraudulentCertificateReporter() override; |
| 28 | 30 |
| 29 // Allows users of this class to override this and set their own URLRequest | 31 // Allows users of this class to override this and set their own URLRequest |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 49 private: | 51 private: |
| 50 // Performs post-report cleanup. | 52 // Performs post-report cleanup. |
| 51 void RequestComplete(net::URLRequest* request); | 53 void RequestComplete(net::URLRequest* request); |
| 52 | 54 |
| 53 // Owns the contained requests. | 55 // Owns the contained requests. |
| 54 std::set<net::URLRequest*> inflight_requests_; | 56 std::set<net::URLRequest*> inflight_requests_; |
| 55 | 57 |
| 56 DISALLOW_COPY_AND_ASSIGN(ChromeFraudulentCertificateReporter); | 58 DISALLOW_COPY_AND_ASSIGN(ChromeFraudulentCertificateReporter); |
| 57 }; | 59 }; |
| 58 | 60 |
| 61 void CalculateSymmetricKeys(const uint8* client_private_key, | |
|
agl
2015/03/05 19:22:26
this can be written:
const uint8 client_private_
| |
| 62 const uint8* server_public_key, | |
| 63 std::string& aes_key, | |
|
agl
2015/03/05 19:22:25
These are outputs? If so, it should be a std::stri
| |
| 64 std::string& hmac_key); | |
| 65 bool EncryptSerializedReport(const uint8* server_public_key, | |
| 66 uint32 server_public_key_version, | |
| 67 const std::string& report, | |
| 68 EncryptedCertLoggerRequest& encrypted_report); | |
|
agl
2015/03/05 19:22:25
If encrypted_report is an output, it should be a p
| |
| 69 | |
| 59 } // namespace chrome_browser_net | 70 } // namespace chrome_browser_net |
| 60 | 71 |
| 61 #endif // CHROME_BROWSER_NET_CHROME_FRAUDULENT_CERTIFICATE_REPORTER_H_ | 72 #endif // CHROME_BROWSER_NET_CHROME_FRAUDULENT_CERTIFICATE_REPORTER_H_ |
| OLD | NEW |