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