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

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

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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_session.h ('k') | net/quic/quic_session_test.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/quic_session.h" 5 #include "net/quic/quic_session.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/crypto/proof_verifier.h" 8 #include "net/quic/crypto/proof_verifier.h"
9 #include "net/quic/quic_connection.h" 9 #include "net/quic/quic_connection.h"
10 #include "net/quic/quic_flags.h" 10 #include "net/quic/quic_flags.h"
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 return GetCryptoStream()->encryption_established(); 421 return GetCryptoStream()->encryption_established();
422 } 422 }
423 423
424 bool QuicSession::IsCryptoHandshakeConfirmed() { 424 bool QuicSession::IsCryptoHandshakeConfirmed() {
425 return GetCryptoStream()->handshake_confirmed(); 425 return GetCryptoStream()->handshake_confirmed();
426 } 426 }
427 427
428 void QuicSession::OnConfigNegotiated() { 428 void QuicSession::OnConfigNegotiated() {
429 connection_->SetFromConfig(config_); 429 connection_->SetFromConfig(config_);
430 430
431 uint32 max_streams = config_.MaxStreamsPerConnection(); 431 uint32_t max_streams = config_.MaxStreamsPerConnection();
432 if (perspective() == Perspective::IS_SERVER) { 432 if (perspective() == Perspective::IS_SERVER) {
433 // A server should accept a small number of additional streams beyond the 433 // A server should accept a small number of additional streams beyond the
434 // limit sent to the client. This helps avoid early connection termination 434 // limit sent to the client. This helps avoid early connection termination
435 // when FIN/RSTs for old streams are lost or arrive out of order. 435 // when FIN/RSTs for old streams are lost or arrive out of order.
436 // Use a minimum number of additional streams, or a percentage increase, 436 // Use a minimum number of additional streams, or a percentage increase,
437 // whichever is larger. 437 // whichever is larger.
438 max_streams = max(max_streams + kMaxStreamsMinimumIncrement, 438 max_streams =
439 static_cast<uint32>(max_streams * kMaxStreamsMultiplier)); 439 max(max_streams + kMaxStreamsMinimumIncrement,
440 static_cast<uint32_t>(max_streams * kMaxStreamsMultiplier));
440 441
441 if (config_.HasReceivedConnectionOptions()) { 442 if (config_.HasReceivedConnectionOptions()) {
442 if (ContainsQuicTag(config_.ReceivedConnectionOptions(), kAFCW)) { 443 if (ContainsQuicTag(config_.ReceivedConnectionOptions(), kAFCW)) {
443 // The following variations change the initial receive flow control 444 // The following variations change the initial receive flow control
444 // window sizes. 445 // window sizes.
445 if (ContainsQuicTag(config_.ReceivedConnectionOptions(), kIFW5)) { 446 if (ContainsQuicTag(config_.ReceivedConnectionOptions(), kIFW5)) {
446 AdjustInitialFlowControlWindows(32 * 1024); 447 AdjustInitialFlowControlWindows(32 * 1024);
447 } 448 }
448 if (ContainsQuicTag(config_.ReceivedConnectionOptions(), kIFW6)) { 449 if (ContainsQuicTag(config_.ReceivedConnectionOptions(), kIFW6)) {
449 AdjustInitialFlowControlWindows(64 * 1024); 450 AdjustInitialFlowControlWindows(64 * 1024);
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 } 810 }
810 } 811 }
811 return false; 812 return false;
812 } 813 }
813 814
814 bool QuicSession::IsIncomingStream(QuicStreamId id) const { 815 bool QuicSession::IsIncomingStream(QuicStreamId id) const {
815 return id % 2 != next_outgoing_stream_id_ % 2; 816 return id % 2 != next_outgoing_stream_id_ % 2;
816 } 817 }
817 818
818 } // namespace net 819 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session.h ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698