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

Side by Side Diff: net/quic/quartc/quartc_session.cc

Issue 2825083003: Landing Recent QUIC changes until Mon Apr 17 2017 (Closed)
Patch Set: Format Created 3 years, 8 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/quartc/quartc_session.h ('k') | net/quic/quartc/quartc_stream_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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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/quartc/quartc_session.h" 5 #include "net/quic/quartc/quartc_session.h"
6 6
7 #include "base/rand_util.h" 7 #include "base/rand_util.h"
8 #include "net/quic/platform/api/quic_string_piece.h" 8 #include "net/quic/platform/api/quic_string_piece.h"
9 9
10 namespace { 10 namespace {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // The |message| is used to handle the return value of AddDefaultConfig 125 // The |message| is used to handle the return value of AddDefaultConfig
126 // which is raw pointer of the CryptoHandshakeMessage. 126 // which is raw pointer of the CryptoHandshakeMessage.
127 std::unique_ptr<CryptoHandshakeMessage> message( 127 std::unique_ptr<CryptoHandshakeMessage> message(
128 quic_crypto_server_config_->AddDefaultConfig( 128 quic_crypto_server_config_->AddDefaultConfig(
129 helper_->GetRandomGenerator(), helper_->GetClock(), options)); 129 helper_->GetRandomGenerator(), helper_->GetClock(), options));
130 } 130 }
131 } 131 }
132 132
133 QuartcSession::~QuartcSession() {} 133 QuartcSession::~QuartcSession() {}
134 134
135 QuicCryptoStream* QuartcSession::GetCryptoStream() { 135 const QuicCryptoStream* QuartcSession::GetCryptoStream() const {
136 return crypto_stream_.get(); 136 return crypto_stream_.get();
137 } 137 }
138 138
139 QuicCryptoStream* QuartcSession::GetMutableCryptoStream() {
140 return crypto_stream_.get();
141 }
142
139 QuartcStream* QuartcSession::CreateOutgoingDynamicStream( 143 QuartcStream* QuartcSession::CreateOutgoingDynamicStream(
140 SpdyPriority priority) { 144 SpdyPriority priority) {
141 return CreateDataStream(GetNextOutgoingStreamId(), priority); 145 return CreateDataStream(GetNextOutgoingStreamId(), priority);
142 } 146 }
143 147
144 void QuartcSession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) { 148 void QuartcSession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) {
145 QuicSession::OnCryptoHandshakeEvent(event); 149 QuicSession::OnCryptoHandshakeEvent(event);
146 if (event == HANDSHAKE_CONFIRMED) { 150 if (event == HANDSHAKE_CONFIRMED) {
147 DCHECK(IsEncryptionEstablished()); 151 DCHECK(IsEncryptionEstablished());
148 DCHECK(IsCryptoHandshakeConfirmed()); 152 DCHECK(IsCryptoHandshakeConfirmed());
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 ActivateStream(std::unique_ptr<QuicStream>(stream)); 280 ActivateStream(std::unique_ptr<QuicStream>(stream));
277 // Register the stream to the QuicWriteBlockedList. |priority| is clamped 281 // Register the stream to the QuicWriteBlockedList. |priority| is clamped
278 // between 0 and 7, with 0 being the highest priority and 7 the lowest 282 // between 0 and 7, with 0 being the highest priority and 7 the lowest
279 // priority. 283 // priority.
280 write_blocked_streams()->RegisterStream(stream->id(), priority); 284 write_blocked_streams()->RegisterStream(stream->id(), priority);
281 } 285 }
282 return stream; 286 return stream;
283 } 287 }
284 288
285 } // namespace net 289 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quartc/quartc_session.h ('k') | net/quic/quartc/quartc_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698