Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(749)

Side by Side Diff: net/quic/chromium/bidirectional_stream_quic_impl.cc

Issue 2349363002: Adds GetLoadTimingInfo to net::BidirectionalStreamImpl (Closed)
Patch Set: address comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 return headers_bytes_received_ + stream_->stream_bytes_read(); 208 return headers_bytes_received_ + stream_->stream_bytes_read();
209 return headers_bytes_received_ + closed_stream_received_bytes_; 209 return headers_bytes_received_ + closed_stream_received_bytes_;
210 } 210 }
211 211
212 int64_t BidirectionalStreamQuicImpl::GetTotalSentBytes() const { 212 int64_t BidirectionalStreamQuicImpl::GetTotalSentBytes() const {
213 if (stream_) 213 if (stream_)
214 return headers_bytes_sent_ + stream_->stream_bytes_written(); 214 return headers_bytes_sent_ + stream_->stream_bytes_written();
215 return headers_bytes_sent_ + closed_stream_sent_bytes_; 215 return headers_bytes_sent_ + closed_stream_sent_bytes_;
216 } 216 }
217 217
218 bool BidirectionalStreamQuicImpl::GetLoadTimingInfo(
219 LoadTimingInfo* load_timing_info) const {
220 // TODO(xunjieli): implement this crbug.com/648346.
221 return true;
222 }
223
218 void BidirectionalStreamQuicImpl::OnHeadersAvailable( 224 void BidirectionalStreamQuicImpl::OnHeadersAvailable(
219 const SpdyHeaderBlock& headers, 225 const SpdyHeaderBlock& headers,
220 size_t frame_len) { 226 size_t frame_len) {
221 headers_bytes_received_ += frame_len; 227 headers_bytes_received_ += frame_len;
222 negotiated_protocol_ = kProtoQUIC1SPDY3; 228 negotiated_protocol_ = kProtoQUIC1SPDY3;
223 if (!has_received_headers_) { 229 if (!has_received_headers_) {
224 has_received_headers_ = true; 230 has_received_headers_ = true;
225 if (delegate_) 231 if (delegate_)
226 delegate_->OnHeadersReceived(headers); 232 delegate_->OnHeadersReceived(headers);
227 } else { 233 } else {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 void BidirectionalStreamQuicImpl::ResetStream() { 345 void BidirectionalStreamQuicImpl::ResetStream() {
340 if (!stream_) 346 if (!stream_)
341 return; 347 return;
342 closed_stream_received_bytes_ = stream_->stream_bytes_read(); 348 closed_stream_received_bytes_ = stream_->stream_bytes_read();
343 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); 349 closed_stream_sent_bytes_ = stream_->stream_bytes_written();
344 stream_->SetDelegate(nullptr); 350 stream_->SetDelegate(nullptr);
345 stream_ = nullptr; 351 stream_ = nullptr;
346 } 352 }
347 353
348 } // namespace net 354 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/bidirectional_stream_quic_impl.h ('k') | net/spdy/bidirectional_stream_spdy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698