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 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 const URLRequestContext* context = request_->context(); | 859 const URLRequestContext* context = request_->context(); |
860 | 860 |
861 if (result == ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN && | 861 if (result == ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN && |
862 transaction_->GetResponseInfo() != NULL) { | 862 transaction_->GetResponseInfo() != NULL) { |
863 FraudulentCertificateReporter* reporter = | 863 FraudulentCertificateReporter* reporter = |
864 context->fraudulent_certificate_reporter(); | 864 context->fraudulent_certificate_reporter(); |
865 if (reporter != NULL) { | 865 if (reporter != NULL) { |
866 const SSLInfo& ssl_info = transaction_->GetResponseInfo()->ssl_info; | 866 const SSLInfo& ssl_info = transaction_->GetResponseInfo()->ssl_info; |
867 const std::string& host = request_->url().host(); | 867 const std::string& host = request_->url().host(); |
868 | 868 |
869 reporter->SendReport(host, ssl_info); | 869 reporter->SendReport( |
| 870 FraudulentCertificateReporter::REPORT_TYPE_PIN_VIOLATION, host, |
| 871 ssl_info); |
870 } | 872 } |
871 } | 873 } |
872 | 874 |
873 if (result == OK) { | 875 if (result == OK) { |
874 if (transaction_ && transaction_->GetResponseInfo()) { | 876 if (transaction_ && transaction_->GetResponseInfo()) { |
875 SetProxyServer(transaction_->GetResponseInfo()->proxy_server); | 877 SetProxyServer(transaction_->GetResponseInfo()->proxy_server); |
876 } | 878 } |
877 scoped_refptr<HttpResponseHeaders> headers = GetResponseHeaders(); | 879 scoped_refptr<HttpResponseHeaders> headers = GetResponseHeaders(); |
878 if (network_delegate()) { | 880 if (network_delegate()) { |
879 // Note that |this| may not be deleted until | 881 // Note that |this| may not be deleted until |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1496 return override_response_headers_.get() ? | 1498 return override_response_headers_.get() ? |
1497 override_response_headers_.get() : | 1499 override_response_headers_.get() : |
1498 transaction_->GetResponseInfo()->headers.get(); | 1500 transaction_->GetResponseInfo()->headers.get(); |
1499 } | 1501 } |
1500 | 1502 |
1501 void URLRequestHttpJob::NotifyURLRequestDestroyed() { | 1503 void URLRequestHttpJob::NotifyURLRequestDestroyed() { |
1502 awaiting_callback_ = false; | 1504 awaiting_callback_ = false; |
1503 } | 1505 } |
1504 | 1506 |
1505 } // namespace net | 1507 } // namespace net |
OLD | NEW |