| 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->SendPinningViolationReport(host, ssl_info); |
| 870 } | 870 } |
| 871 } | 871 } |
| 872 | 872 |
| 873 if (result == OK) { | 873 if (result == OK) { |
| 874 if (transaction_ && transaction_->GetResponseInfo()) { | 874 if (transaction_ && transaction_->GetResponseInfo()) { |
| 875 SetProxyServer(transaction_->GetResponseInfo()->proxy_server); | 875 SetProxyServer(transaction_->GetResponseInfo()->proxy_server); |
| 876 } | 876 } |
| 877 scoped_refptr<HttpResponseHeaders> headers = GetResponseHeaders(); | 877 scoped_refptr<HttpResponseHeaders> headers = GetResponseHeaders(); |
| 878 if (network_delegate()) { | 878 if (network_delegate()) { |
| 879 // Note that |this| may not be deleted until | 879 // 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() ? | 1496 return override_response_headers_.get() ? |
| 1497 override_response_headers_.get() : | 1497 override_response_headers_.get() : |
| 1498 transaction_->GetResponseInfo()->headers.get(); | 1498 transaction_->GetResponseInfo()->headers.get(); |
| 1499 } | 1499 } |
| 1500 | 1500 |
| 1501 void URLRequestHttpJob::NotifyURLRequestDestroyed() { | 1501 void URLRequestHttpJob::NotifyURLRequestDestroyed() { |
| 1502 awaiting_callback_ = false; | 1502 awaiting_callback_ = false; |
| 1503 } | 1503 } |
| 1504 | 1504 |
| 1505 } // namespace net | 1505 } // namespace net |
| OLD | NEW |