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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
745 SetStatus(URLRequestStatus()); | 745 SetStatus(URLRequestStatus()); |
746 | 746 |
747 const URLRequestContext* context = request_->context(); | 747 const URLRequestContext* context = request_->context(); |
748 | 748 |
749 if (result == ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN && | 749 if (result == ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN && |
750 transaction_->GetResponseInfo() != NULL) { | 750 transaction_->GetResponseInfo() != NULL) { |
751 FraudulentCertificateReporter* reporter = | 751 FraudulentCertificateReporter* reporter = |
752 context->fraudulent_certificate_reporter(); | 752 context->fraudulent_certificate_reporter(); |
753 if (reporter != NULL) { | 753 if (reporter != NULL) { |
754 const SSLInfo& ssl_info = transaction_->GetResponseInfo()->ssl_info; | 754 const SSLInfo& ssl_info = transaction_->GetResponseInfo()->ssl_info; |
755 bool sni_available = SSLConfigService::IsSNIAvailable( | |
756 context->ssl_config_service()); | |
757 const std::string& host = request_->url().host(); | 755 const std::string& host = request_->url().host(); |
758 | 756 |
759 reporter->SendReport(host, ssl_info, sni_available); | 757 TransportSecurityState::DomainState domain_state; |
758 const URLRequestContext* context = request_->context(); | |
759 const bool report_to_google = context->transport_security_state() && | |
760 context->transport_security_state()->GetDomainState( | |
761 request_info_.url.host(), | |
palmer
2013/04/02 22:56:05
Use |host| for this (declared and assigned on line
unsafe
2013/04/03 05:21:42
Done. Of course, we should really have a single G
| |
762 SSLConfigService::IsSNIAvailable(context->ssl_config_service()), | |
763 &domain_state) && domain_state.IsGooglePinnedProperty(); | |
764 if (report_to_google) | |
765 reporter->SendReport(host, ssl_info); | |
760 } | 766 } |
761 } | 767 } |
762 | 768 |
763 if (result == OK) { | 769 if (result == OK) { |
764 scoped_refptr<HttpResponseHeaders> headers = GetResponseHeaders(); | 770 scoped_refptr<HttpResponseHeaders> headers = GetResponseHeaders(); |
765 if (context->network_delegate()) { | 771 if (context->network_delegate()) { |
766 // Note that |this| may not be deleted until | 772 // Note that |this| may not be deleted until |
767 // |on_headers_received_callback_| or | 773 // |on_headers_received_callback_| or |
768 // |NetworkDelegate::URLRequestDestroyed()| has been called. | 774 // |NetworkDelegate::URLRequestDestroyed()| has been called. |
769 int error = context->network_delegate()-> | 775 int error = context->network_delegate()-> |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1574 | 1580 |
1575 void URLRequestHttpJob::NotifyURLRequestDestroyed() { | 1581 void URLRequestHttpJob::NotifyURLRequestDestroyed() { |
1576 awaiting_callback_ = false; | 1582 awaiting_callback_ = false; |
1577 } | 1583 } |
1578 | 1584 |
1579 void URLRequestHttpJob::OnDetachRequest() { | 1585 void URLRequestHttpJob::OnDetachRequest() { |
1580 http_transaction_delegate_->OnDetachRequest(); | 1586 http_transaction_delegate_->OnDetachRequest(); |
1581 } | 1587 } |
1582 | 1588 |
1583 } // namespace net | 1589 } // namespace net |
OLD | NEW |