Chromium Code Reviews| 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/spdy/spdy_http_stream.h" | 5 #include "net/spdy/spdy_http_stream.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <list> | 8 #include <list> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 if (!SpdyHeadersToHttpResponse(response_headers, response_info_)) { | 324 if (!SpdyHeadersToHttpResponse(response_headers, response_info_)) { |
| 325 // We do not have complete headers yet. | 325 // We do not have complete headers yet. |
| 326 return RESPONSE_HEADERS_ARE_INCOMPLETE; | 326 return RESPONSE_HEADERS_ARE_INCOMPLETE; |
| 327 } | 327 } |
| 328 | 328 |
| 329 response_info_->response_time = stream_->response_time(); | 329 response_info_->response_time = stream_->response_time(); |
| 330 response_headers_status_ = RESPONSE_HEADERS_ARE_COMPLETE; | 330 response_headers_status_ = RESPONSE_HEADERS_ARE_COMPLETE; |
| 331 // Don't store the SSLInfo in the response here, HttpNetworkTransaction | 331 // Don't store the SSLInfo in the response here, HttpNetworkTransaction |
| 332 // will take care of that part. | 332 // will take care of that part. |
| 333 response_info_->was_alpn_negotiated = was_alpn_negotiated_; | 333 response_info_->was_alpn_negotiated = was_alpn_negotiated_; |
| 334 response_info_->alpn_negotiated_protocol = | |
| 335 SSLClientSocket::NextProtoToString(negotiated_protocol_); | |
| 336 response_info_->request_time = stream_->GetRequestTime(); | 334 response_info_->request_time = stream_->GetRequestTime(); |
| 337 response_info_->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP2; | 335 response_info_->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP2; |
| 336 response_info_->alpn_negotiated_protocol = | |
| 337 HttpResponseInfo::ConnectionInfoToString(response_info_->connection_info); | |
|
Ryan Hamilton
2016/10/28 19:02:02
Why is "alpn_negotiated_protocol" being set to a C
Bence
2016/11/01 15:11:23
This is for consistency with QuicHttpStream, where
Ryan Hamilton
2016/11/03 14:33:05
Should we remove |alpn_negotiated_protocol| at som
Bence
2016/11/07 20:22:18
Yes please, I would love that! It's just confusin
| |
| 338 response_info_->vary_data | 338 response_info_->vary_data |
| 339 .Init(*request_info_, *response_info_->headers.get()); | 339 .Init(*request_info_, *response_info_->headers.get()); |
| 340 | 340 |
| 341 if (!response_callback_.is_null()) { | 341 if (!response_callback_.is_null()) { |
| 342 DoResponseCallback(OK); | 342 DoResponseCallback(OK); |
| 343 } | 343 } |
| 344 | 344 |
| 345 return RESPONSE_HEADERS_ARE_COMPLETE; | 345 return RESPONSE_HEADERS_ARE_COMPLETE; |
| 346 } | 346 } |
| 347 | 347 |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 614 details->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP2; | 614 details->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP2; |
| 615 return; | 615 return; |
| 616 } | 616 } |
| 617 | 617 |
| 618 void SpdyHttpStream::SetPriority(RequestPriority priority) { | 618 void SpdyHttpStream::SetPriority(RequestPriority priority) { |
| 619 // TODO(akalin): Plumb this through to |stream_request_| and | 619 // TODO(akalin): Plumb this through to |stream_request_| and |
| 620 // |stream_|. | 620 // |stream_|. |
| 621 } | 621 } |
| 622 | 622 |
| 623 } // namespace net | 623 } // namespace net |
| OLD | NEW |