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_request.h" | 5 #include "net/http/http_stream_request.h" |
6 | 6 |
7 #include "base/stl_util-inl.h" | 7 #include "base/stl_util-inl.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 return LOAD_STATE_RESOLVING_PROXY_FOR_URL; | 141 return LOAD_STATE_RESOLVING_PROXY_FOR_URL; |
142 case STATE_CREATE_STREAM_COMPLETE: | 142 case STATE_CREATE_STREAM_COMPLETE: |
143 return connection_->GetLoadState(); | 143 return connection_->GetLoadState(); |
144 case STATE_INIT_CONNECTION_COMPLETE: | 144 case STATE_INIT_CONNECTION_COMPLETE: |
145 return LOAD_STATE_SENDING_REQUEST; | 145 return LOAD_STATE_SENDING_REQUEST; |
146 default: | 146 default: |
147 return LOAD_STATE_IDLE; | 147 return LOAD_STATE_IDLE; |
148 } | 148 } |
149 } | 149 } |
150 | 150 |
| 151 bool HttpStreamRequest::was_alternate_protocol_available() const { |
| 152 return was_alternate_protocol_available_; |
| 153 } |
| 154 |
| 155 bool HttpStreamRequest::was_npn_negotiated() const { |
| 156 return was_npn_negotiated_; |
| 157 } |
| 158 |
| 159 bool HttpStreamRequest::using_spdy() const { |
| 160 return using_spdy_; |
| 161 } |
| 162 |
151 void HttpStreamRequest::GetSSLInfo() { | 163 void HttpStreamRequest::GetSSLInfo() { |
152 DCHECK(using_ssl_); | 164 DCHECK(using_ssl_); |
153 DCHECK(!establishing_tunnel_); | 165 DCHECK(!establishing_tunnel_); |
154 DCHECK(connection_.get() && connection_->socket()); | 166 DCHECK(connection_.get() && connection_->socket()); |
155 SSLClientSocket* ssl_socket = | 167 SSLClientSocket* ssl_socket = |
156 static_cast<SSLClientSocket*>(connection_->socket()); | 168 static_cast<SSLClientSocket*>(connection_->socket()); |
157 ssl_socket->GetSSLInfo(&ssl_info_); | 169 ssl_socket->GetSSLInfo(&ssl_info_); |
158 } | 170 } |
159 | 171 |
160 const HttpRequestInfo& HttpStreamRequest::request_info() const { | 172 const HttpRequestInfo& HttpStreamRequest::request_info() const { |
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 base::TimeDelta::FromMinutes(6), | 1057 base::TimeDelta::FromMinutes(6), |
1046 100); | 1058 100); |
1047 break; | 1059 break; |
1048 default: | 1060 default: |
1049 NOTREACHED(); | 1061 NOTREACHED(); |
1050 break; | 1062 break; |
1051 } | 1063 } |
1052 } | 1064 } |
1053 | 1065 |
1054 } // namespace net | 1066 } // namespace net |
OLD | NEW |