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

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

Issue 2862563003: Landing Recent QUIC changes until Sat Apr 29 00:22:04 2017 +0000 (Closed)
Patch Set: rebase and fix test bugs detected by swarm bot. Created 3 years, 7 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/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_client_session.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/core/crypto/quic_random.h" 7 #include "net/quic/core/crypto/quic_random.h"
8 #include "net/quic/core/quic_server_id.h" 8 #include "net/quic/core/quic_server_id.h"
9 #include "net/quic/core/spdy_utils.h" 9 #include "net/quic/core/spdy_utils.h"
10 #include "net/quic/platform/api/quic_flags.h" 10 #include "net/quic/platform/api/quic_flags.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 } 250 }
251 while (WaitForEvents()) { 251 while (WaitForEvents()) {
252 } 252 }
253 } 253 }
254 254
255 QuicSpdyClientStream* QuicClientBase::CreateClientStream() { 255 QuicSpdyClientStream* QuicClientBase::CreateClientStream() {
256 if (!connected()) { 256 if (!connected()) {
257 return nullptr; 257 return nullptr;
258 } 258 }
259 259
260 QuicSpdyClientStream* stream = 260 auto* stream = static_cast<QuicSpdyClientStream*>(
261 session_->CreateOutgoingDynamicStream(kDefaultPriority); 261 FLAGS_quic_reloadable_flag_quic_refactor_stream_creation
262 ? session_->MaybeCreateOutgoingDynamicStream(kDefaultPriority)
263 : session_->CreateOutgoingDynamicStream(kDefaultPriority));
262 if (stream) { 264 if (stream) {
263 stream->set_visitor(this); 265 stream->set_visitor(this);
264 } 266 }
265 return stream; 267 return stream;
266 } 268 }
267 269
268 bool QuicClientBase::WaitForEvents() { 270 bool QuicClientBase::WaitForEvents() {
269 DCHECK(connected()); 271 DCHECK(connected());
270 272
271 RunEventLoop(); 273 RunEventLoop();
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 QUIC_BUG_IF(!store_response_) << "Response not stored!"; 487 QUIC_BUG_IF(!store_response_) << "Response not stored!";
486 return latest_response_body_; 488 return latest_response_body_;
487 } 489 }
488 490
489 const string& QuicClientBase::latest_response_trailers() const { 491 const string& QuicClientBase::latest_response_trailers() const {
490 QUIC_BUG_IF(!store_response_) << "Response not stored!"; 492 QUIC_BUG_IF(!store_response_) << "Response not stored!";
491 return latest_response_trailers_; 493 return latest_response_trailers_;
492 } 494 }
493 495
494 } // namespace net 496 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_client_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698