| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/bidirectional_stream.h" | 5 #include "net/http/bidirectional_stream.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 const SpdyHeaderBlock& response_headers) { | 134 const SpdyHeaderBlock& response_headers) { |
| 135 HttpResponseInfo response_info; | 135 HttpResponseInfo response_info; |
| 136 if (!SpdyHeadersToHttpResponse(response_headers, HTTP2, &response_info)) { | 136 if (!SpdyHeadersToHttpResponse(response_headers, HTTP2, &response_info)) { |
| 137 DLOG(WARNING) << "Invalid headers"; | 137 DLOG(WARNING) << "Invalid headers"; |
| 138 delegate_->OnFailed(ERR_FAILED); | 138 delegate_->OnFailed(ERR_FAILED); |
| 139 return; | 139 return; |
| 140 } | 140 } |
| 141 | 141 |
| 142 session_->http_stream_factory()->ProcessAlternativeServices( | 142 session_->http_stream_factory()->ProcessAlternativeServices( |
| 143 session_, response_info.headers.get(), | 143 session_, response_info.headers.get(), |
| 144 HostPortPair::FromURL(request_info_->url)); | 144 url::SchemeHostPort(request_info_->url)); |
| 145 delegate_->OnHeadersReceived(response_headers); | 145 delegate_->OnHeadersReceived(response_headers); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void BidirectionalStream::OnDataRead(int bytes_read) { | 148 void BidirectionalStream::OnDataRead(int bytes_read) { |
| 149 delegate_->OnDataRead(bytes_read); | 149 delegate_->OnDataRead(bytes_read); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void BidirectionalStream::OnDataSent() { | 152 void BidirectionalStream::OnDataSent() { |
| 153 delegate_->OnDataSent(); | 153 delegate_->OnDataSent(); |
| 154 } | 154 } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 const ProxyInfo& used_proxy_info, | 228 const ProxyInfo& used_proxy_info, |
| 229 HttpStream* stream) { | 229 HttpStream* stream) { |
| 230 DCHECK(stream_request_); | 230 DCHECK(stream_request_); |
| 231 | 231 |
| 232 delegate_->OnFailed(ERR_HTTPS_PROXY_TUNNEL_RESPONSE); | 232 delegate_->OnFailed(ERR_HTTPS_PROXY_TUNNEL_RESPONSE); |
| 233 } | 233 } |
| 234 | 234 |
| 235 void BidirectionalStream::OnQuicBroken() {} | 235 void BidirectionalStream::OnQuicBroken() {} |
| 236 | 236 |
| 237 } // namespace net | 237 } // namespace net |
| OLD | NEW |