OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/http/http_stream_parser.h" | 5 #include "net/http/http_stream_parser.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "net/base/auth.h" | 9 #include "net/base/auth.h" |
10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 ClientSocketHandle::SocketReuseType reuse_type = connection_->reuse_type(); | 637 ClientSocketHandle::SocketReuseType reuse_type = connection_->reuse_type(); |
638 return connection_->is_reused() || | 638 return connection_->is_reused() || |
639 reuse_type == ClientSocketHandle::UNUSED_IDLE; | 639 reuse_type == ClientSocketHandle::UNUSED_IDLE; |
640 } | 640 } |
641 | 641 |
642 void HttpStreamParser::SetConnectionReused() { | 642 void HttpStreamParser::SetConnectionReused() { |
643 connection_->set_is_reused(true); | 643 connection_->set_is_reused(true); |
644 } | 644 } |
645 | 645 |
646 void HttpStreamParser::GetSSLInfo(SSLInfo* ssl_info) { | 646 void HttpStreamParser::GetSSLInfo(SSLInfo* ssl_info) { |
647 if (request_->url.SchemeIs("https") && connection_->socket()) { | 647 if ((request_->url.SchemeIs("https") || request_->url.SchemeIs("httpsv")) && |
| 648 connection_->socket()) { |
648 SSLClientSocket* ssl_socket = | 649 SSLClientSocket* ssl_socket = |
649 static_cast<SSLClientSocket*>(connection_->socket()); | 650 static_cast<SSLClientSocket*>(connection_->socket()); |
650 ssl_socket->GetSSLInfo(ssl_info); | 651 ssl_socket->GetSSLInfo(ssl_info); |
651 } | 652 } |
652 } | 653 } |
653 | 654 |
654 void HttpStreamParser::GetSSLCertRequestInfo( | 655 void HttpStreamParser::GetSSLCertRequestInfo( |
655 SSLCertRequestInfo* cert_request_info) { | 656 SSLCertRequestInfo* cert_request_info) { |
656 if (request_->url.SchemeIs("https") && connection_->socket()) { | 657 if ((request_->url.SchemeIs("https") || request_->url.SchemeIs("httpsv")) && |
| 658 connection_->socket()) { |
657 SSLClientSocket* ssl_socket = | 659 SSLClientSocket* ssl_socket = |
658 static_cast<SSLClientSocket*>(connection_->socket()); | 660 static_cast<SSLClientSocket*>(connection_->socket()); |
659 ssl_socket->GetSSLCertRequestInfo(cert_request_info); | 661 ssl_socket->GetSSLCertRequestInfo(cert_request_info); |
660 } | 662 } |
661 } | 663 } |
662 | 664 |
663 } // namespace net | 665 } // namespace net |
OLD | NEW |