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

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

Issue 350973003: Killing off quic V17. Not flag protected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_data_stream_test.cc ('k') | net/quic/quic_framer.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/quic_flow_controller.h" 5 #include "net/quic/quic_flow_controller.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "net/quic/quic_connection.h" 8 #include "net/quic/quic_connection.h"
9 #include "net/quic/quic_flags.h" 9 #include "net/quic/quic_flags.h"
10 #include "net/quic/quic_protocol.h" 10 #include "net/quic/quic_protocol.h"
(...skipping 18 matching lines...) Expand all
29 send_window_offset_(send_window_offset), 29 send_window_offset_(send_window_offset),
30 receive_window_offset_(receive_window_offset), 30 receive_window_offset_(receive_window_offset),
31 max_receive_window_(max_receive_window), 31 max_receive_window_(max_receive_window),
32 last_blocked_send_window_offset_(0) { 32 last_blocked_send_window_offset_(0) {
33 DVLOG(1) << ENDPOINT << "Created flow controller for stream " << id_ 33 DVLOG(1) << ENDPOINT << "Created flow controller for stream " << id_
34 << ", setting initial receive window offset to: " 34 << ", setting initial receive window offset to: "
35 << receive_window_offset_ 35 << receive_window_offset_
36 << ", max receive window to: " 36 << ", max receive window to: "
37 << max_receive_window_ 37 << max_receive_window_
38 << ", setting send window offset to: " << send_window_offset_; 38 << ", setting send window offset to: " << send_window_offset_;
39 if (connection_->version() < QUIC_VERSION_17) { 39 if (connection_->version() <= QUIC_VERSION_16) {
40 DVLOG(1) << ENDPOINT << "Disabling QuicFlowController for stream " << id_ 40 DVLOG(1) << ENDPOINT << "Disabling QuicFlowController for stream " << id_
41 << ", QUIC version " << connection_->version(); 41 << ", QUIC version " << connection_->version();
42 Disable(); 42 Disable();
43 } 43 }
44 } 44 }
45 45
46 void QuicFlowController::AddBytesConsumed(uint64 bytes_consumed) { 46 void QuicFlowController::AddBytesConsumed(uint64 bytes_consumed) {
47 if (!IsEnabled()) { 47 if (!IsEnabled()) {
48 return; 48 return;
49 } 49 }
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 192 }
193 193
194 uint64 QuicFlowController::SendWindowSize() const { 194 uint64 QuicFlowController::SendWindowSize() const {
195 if (bytes_sent_ > send_window_offset_) { 195 if (bytes_sent_ > send_window_offset_) {
196 return 0; 196 return 0;
197 } 197 }
198 return send_window_offset_ - bytes_sent_; 198 return send_window_offset_ - bytes_sent_;
199 } 199 }
200 200
201 } // namespace net 201 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_data_stream_test.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698