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

Side by Side Diff: net/spdy/bidirectional_stream_spdy_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
« no previous file with comments | « net/spdy/bidirectional_stream_spdy_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/spdy/bidirectional_stream_spdy_impl.h" 5 #include "net/spdy/bidirectional_stream_spdy_impl.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/time/time.h" 10 #include "base/time/time.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 int64_t BidirectionalStreamSpdyImpl::GetTotalSentBytes() const { 169 int64_t BidirectionalStreamSpdyImpl::GetTotalSentBytes() const {
170 if (stream_closed_) 170 if (stream_closed_)
171 return closed_stream_sent_bytes_; 171 return closed_stream_sent_bytes_;
172 172
173 if (!stream_) 173 if (!stream_)
174 return 0; 174 return 0;
175 175
176 return stream_->raw_sent_bytes(); 176 return stream_->raw_sent_bytes();
177 } 177 }
178 178
179 bool BidirectionalStreamSpdyImpl::GetLoadTimingInfo(
180 LoadTimingInfo* load_timing_info) const {
181 // TODO(xunjieli): Implement this crbug.com/648346
182 return true;
183 }
184
179 void BidirectionalStreamSpdyImpl::OnRequestHeadersSent() { 185 void BidirectionalStreamSpdyImpl::OnRequestHeadersSent() {
180 DCHECK(stream_); 186 DCHECK(stream_);
181 187
182 negotiated_protocol_ = kProtoHTTP2; 188 negotiated_protocol_ = kProtoHTTP2;
183 if (delegate_) 189 if (delegate_)
184 delegate_->OnStreamReady(/*request_headers_sent=*/true); 190 delegate_->OnStreamReady(/*request_headers_sent=*/true);
185 } 191 }
186 192
187 SpdyResponseHeadersStatus BidirectionalStreamSpdyImpl::OnResponseHeadersUpdated( 193 SpdyResponseHeadersStatus BidirectionalStreamSpdyImpl::OnResponseHeadersUpdated(
188 const SpdyHeaderBlock& response_headers) { 194 const SpdyHeaderBlock& response_headers) {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 353
348 bool BidirectionalStreamSpdyImpl::ShouldWaitForMoreBufferedData() const { 354 bool BidirectionalStreamSpdyImpl::ShouldWaitForMoreBufferedData() const {
349 if (stream_closed_) 355 if (stream_closed_)
350 return false; 356 return false;
351 DCHECK_GT(read_buffer_len_, 0); 357 DCHECK_GT(read_buffer_len_, 0);
352 return read_data_queue_.GetTotalSize() < 358 return read_data_queue_.GetTotalSize() <
353 static_cast<size_t>(read_buffer_len_); 359 static_cast<size_t>(read_buffer_len_);
354 } 360 }
355 361
356 } // namespace net 362 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/bidirectional_stream_spdy_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698