| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/quic/chromium/bidirectional_stream_quic_impl.h" | 5 #include "net/quic/chromium/bidirectional_stream_quic_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 } else { | 227 } else { |
| 228 load_timing_info->socket_reused = true; | 228 load_timing_info->socket_reused = true; |
| 229 } | 229 } |
| 230 return true; | 230 return true; |
| 231 } | 231 } |
| 232 | 232 |
| 233 void BidirectionalStreamQuicImpl::OnHeadersAvailable( | 233 void BidirectionalStreamQuicImpl::OnHeadersAvailable( |
| 234 const SpdyHeaderBlock& headers, | 234 const SpdyHeaderBlock& headers, |
| 235 size_t frame_len) { | 235 size_t frame_len) { |
| 236 headers_bytes_received_ += frame_len; | 236 headers_bytes_received_ += frame_len; |
| 237 negotiated_protocol_ = kProtoQUIC1SPDY3; | 237 negotiated_protocol_ = kProtoQUIC; |
| 238 if (!has_received_headers_) { | 238 if (!has_received_headers_) { |
| 239 has_received_headers_ = true; | 239 has_received_headers_ = true; |
| 240 connect_timing_ = session_->GetConnectTiming(); | 240 connect_timing_ = session_->GetConnectTiming(); |
| 241 if (delegate_) | 241 if (delegate_) |
| 242 delegate_->OnHeadersReceived(headers); | 242 delegate_->OnHeadersReceived(headers); |
| 243 } else { | 243 } else { |
| 244 if (delegate_) | 244 if (delegate_) |
| 245 delegate_->OnTrailersReceived(headers); | 245 delegate_->OnTrailersReceived(headers); |
| 246 // |this| can be destroyed after this point. | 246 // |this| can be destroyed after this point. |
| 247 } | 247 } |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 if (!stream_) | 350 if (!stream_) |
| 351 return; | 351 return; |
| 352 closed_stream_received_bytes_ = stream_->stream_bytes_read(); | 352 closed_stream_received_bytes_ = stream_->stream_bytes_read(); |
| 353 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); | 353 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); |
| 354 closed_is_first_stream_ = stream_->IsFirstStream(); | 354 closed_is_first_stream_ = stream_->IsFirstStream(); |
| 355 stream_->SetDelegate(nullptr); | 355 stream_->SetDelegate(nullptr); |
| 356 stream_ = nullptr; | 356 stream_ = nullptr; |
| 357 } | 357 } |
| 358 | 358 |
| 359 } // namespace net | 359 } // namespace net |
| OLD | NEW |