OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "net/url_request/url_request_http_job.h" | 5 #include "net/url_request/url_request_http_job.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 const URLRequestContext* context = request_->context(); | 868 const URLRequestContext* context = request_->context(); |
869 | 869 |
870 if (result == ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN && | 870 if (result == ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN && |
871 transaction_->GetResponseInfo() != NULL) { | 871 transaction_->GetResponseInfo() != NULL) { |
872 FraudulentCertificateReporter* reporter = | 872 FraudulentCertificateReporter* reporter = |
873 context->fraudulent_certificate_reporter(); | 873 context->fraudulent_certificate_reporter(); |
874 if (reporter != NULL) { | 874 if (reporter != NULL) { |
875 const SSLInfo& ssl_info = transaction_->GetResponseInfo()->ssl_info; | 875 const SSLInfo& ssl_info = transaction_->GetResponseInfo()->ssl_info; |
876 const std::string& host = request_->url().host(); | 876 const std::string& host = request_->url().host(); |
877 | 877 |
878 reporter->SendReport(host, ssl_info); | 878 reporter->SendReport( |
| 879 FraudulentCertificateReporter::REPORT_TYPE_PIN_VIOLATION, host, |
| 880 ssl_info); |
879 } | 881 } |
880 } | 882 } |
881 | 883 |
882 if (result == OK) { | 884 if (result == OK) { |
883 if (transaction_ && transaction_->GetResponseInfo()) { | 885 if (transaction_ && transaction_->GetResponseInfo()) { |
884 SetProxyServer(transaction_->GetResponseInfo()->proxy_server); | 886 SetProxyServer(transaction_->GetResponseInfo()->proxy_server); |
885 } | 887 } |
886 scoped_refptr<HttpResponseHeaders> headers = GetResponseHeaders(); | 888 scoped_refptr<HttpResponseHeaders> headers = GetResponseHeaders(); |
887 if (network_delegate()) { | 889 if (network_delegate()) { |
888 // Note that |this| may not be deleted until | 890 // Note that |this| may not be deleted until |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1502 return override_response_headers_.get() ? | 1504 return override_response_headers_.get() ? |
1503 override_response_headers_.get() : | 1505 override_response_headers_.get() : |
1504 transaction_->GetResponseInfo()->headers.get(); | 1506 transaction_->GetResponseInfo()->headers.get(); |
1505 } | 1507 } |
1506 | 1508 |
1507 void URLRequestHttpJob::NotifyURLRequestDestroyed() { | 1509 void URLRequestHttpJob::NotifyURLRequestDestroyed() { |
1508 awaiting_callback_ = false; | 1510 awaiting_callback_ = false; |
1509 } | 1511 } |
1510 | 1512 |
1511 } // namespace net | 1513 } // namespace net |
OLD | NEW |