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

Side by Side Diff: net/quic/reliable_quic_stream.cc

Issue 833243008: Update from https://crrev.com/311145 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/quic/quic_stream_factory.cc ('k') | net/socket/ssl_client_socket_nss.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/quic/reliable_quic_stream.h" 5 #include "net/quic/reliable_quic_stream.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/profiler/scoped_tracker.h"
8 #include "net/quic/iovector.h" 9 #include "net/quic/iovector.h"
9 #include "net/quic/quic_flow_controller.h" 10 #include "net/quic/quic_flow_controller.h"
10 #include "net/quic/quic_session.h" 11 #include "net/quic/quic_session.h"
11 #include "net/quic/quic_write_blocked_list.h" 12 #include "net/quic/quic_write_blocked_list.h"
12 13
13 using base::StringPiece; 14 using base::StringPiece;
14 using std::min; 15 using std::min;
15 using std::string; 16 using std::string;
16 17
17 namespace net { 18 namespace net {
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 224
224 void ReliableQuicStream::Reset(QuicRstStreamErrorCode error) { 225 void ReliableQuicStream::Reset(QuicRstStreamErrorCode error) {
225 DCHECK_NE(QUIC_STREAM_NO_ERROR, error); 226 DCHECK_NE(QUIC_STREAM_NO_ERROR, error);
226 stream_error_ = error; 227 stream_error_ = error;
227 // Sending a RstStream results in calling CloseStream. 228 // Sending a RstStream results in calling CloseStream.
228 session()->SendRstStream(id(), error, stream_bytes_written_); 229 session()->SendRstStream(id(), error, stream_bytes_written_);
229 rst_sent_ = true; 230 rst_sent_ = true;
230 } 231 }
231 232
232 void ReliableQuicStream::CloseConnection(QuicErrorCode error) { 233 void ReliableQuicStream::CloseConnection(QuicErrorCode error) {
234 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
235 tracked_objects::ScopedTracker tracking_profile(
236 FROM_HERE_WITH_EXPLICIT_FUNCTION(
237 "422516 ReliableQuicStream::CloseConnection"));
238
233 session()->connection()->SendConnectionClose(error); 239 session()->connection()->SendConnectionClose(error);
234 } 240 }
235 241
236 void ReliableQuicStream::CloseConnectionWithDetails(QuicErrorCode error, 242 void ReliableQuicStream::CloseConnectionWithDetails(QuicErrorCode error,
237 const string& details) { 243 const string& details) {
238 session()->connection()->SendConnectionCloseWithDetails(error, details); 244 session()->connection()->SendConnectionCloseWithDetails(error, details);
239 } 245 }
240 246
241 QuicVersion ReliableQuicStream::version() const { 247 QuicVersion ReliableQuicStream::version() const {
242 return session()->connection()->version(); 248 return session()->connection()->version();
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 528
523 bool ReliableQuicStream::IsFlowControlBlocked() { 529 bool ReliableQuicStream::IsFlowControlBlocked() {
524 if (flow_controller_.IsBlocked()) { 530 if (flow_controller_.IsBlocked()) {
525 return true; 531 return true;
526 } 532 }
527 return stream_contributes_to_connection_flow_control_ && 533 return stream_contributes_to_connection_flow_control_ &&
528 connection_flow_controller_->IsBlocked(); 534 connection_flow_controller_->IsBlocked();
529 } 535 }
530 536
531 } // namespace net 537 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_factory.cc ('k') | net/socket/ssl_client_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698