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

Side by Side Diff: net/tools/quic/quic_client_base.cc

Issue 1320303009: relnote: Allow individual QUIC writers to limit the maximum packet size. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0909_1
Patch Set: Created 5 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/quic/test_tools/quic_test_utils.cc ('k') | net/tools/quic/quic_default_packet_writer.h » ('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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/tools/quic/quic_client_base.h" 5 #include "net/tools/quic/quic_client_base.h"
6 6
7 #include "net/quic/crypto/quic_random.h" 7 #include "net/quic/crypto/quic_random.h"
8 #include "net/quic/quic_server_id.h" 8 #include "net/quic/quic_server_id.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 30 matching lines...) Expand all
41 QuicPacketWriter* QuicClientBase::DummyPacketWriterFactory::Create( 41 QuicPacketWriter* QuicClientBase::DummyPacketWriterFactory::Create(
42 QuicConnection* /*connection*/) const { 42 QuicConnection* /*connection*/) const {
43 return writer_; 43 return writer_;
44 } 44 }
45 45
46 QuicClientSession* QuicClientBase::CreateQuicClientSession( 46 QuicClientSession* QuicClientBase::CreateQuicClientSession(
47 QuicConnection* connection) { 47 QuicConnection* connection) {
48 session_.reset( 48 session_.reset(
49 new QuicClientSession(config_, connection, server_id_, &crypto_config_)); 49 new QuicClientSession(config_, connection, server_id_, &crypto_config_));
50 if (initial_max_packet_length_ != 0) { 50 if (initial_max_packet_length_ != 0) {
51 session()->connection()->set_max_packet_length(initial_max_packet_length_); 51 session()->connection()->SetMaxPacketLength(initial_max_packet_length_);
52 } 52 }
53 return session_.get(); 53 return session_.get();
54 } 54 }
55 55
56 bool QuicClientBase::EncryptionBeingEstablished() { 56 bool QuicClientBase::EncryptionBeingEstablished() {
57 return !session_->IsEncryptionEstablished() && 57 return !session_->IsEncryptionEstablished() &&
58 session_->connection()->connected(); 58 session_->connection()->connected();
59 } 59 }
60 60
61 QuicSpdyClientStream* QuicClientBase::CreateReliableClientStream() { 61 QuicSpdyClientStream* QuicClientBase::CreateReliableClientStream() {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 ? cached->GetNextServerDesignatedConnectionId() 136 ? cached->GetNextServerDesignatedConnectionId()
137 : 0; 137 : 0;
138 } 138 }
139 139
140 QuicConnectionId QuicClientBase::GenerateNewConnectionId() { 140 QuicConnectionId QuicClientBase::GenerateNewConnectionId() {
141 return QuicRandom::GetInstance()->RandUint64(); 141 return QuicRandom::GetInstance()->RandUint64();
142 } 142 }
143 143
144 } // namespace tools 144 } // namespace tools
145 } // namespace net 145 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_test_utils.cc ('k') | net/tools/quic/quic_default_packet_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698