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

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

Issue 1190823003: Remove dependency on headers stream from QuicSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0616
Patch Set: deleted an include Created 5 years, 6 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/quic_server_session_test.cc ('k') | net/tools/quic/quic_spdy_server_stream.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) 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/tools/quic/quic_simple_client.h" 5 #include "net/tools/quic/quic_simple_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 226
227 while (WaitForEvents()) {} 227 while (WaitForEvents()) {}
228 } 228 }
229 229
230 QuicSpdyClientStream* QuicSimpleClient::CreateReliableClientStream() { 230 QuicSpdyClientStream* QuicSimpleClient::CreateReliableClientStream() {
231 if (!connected()) { 231 if (!connected()) {
232 return nullptr; 232 return nullptr;
233 } 233 }
234 234
235 return session_->CreateOutgoingDataStream(); 235 return session_->CreateOutgoingDynamicStream();
236 } 236 }
237 237
238 void QuicSimpleClient::WaitForStreamToClose(QuicStreamId id) { 238 void QuicSimpleClient::WaitForStreamToClose(QuicStreamId id) {
239 DCHECK(connected()); 239 DCHECK(connected());
240 240
241 while (connected() && !session_->IsClosedStream(id)) { 241 while (connected() && !session_->IsClosedStream(id)) {
242 WaitForEvents(); 242 WaitForEvents();
243 } 243 }
244 } 244 }
245 245
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 session_->connection()->ProcessUdpPacket(local_address, peer_address, packet); 326 session_->connection()->ProcessUdpPacket(local_address, peer_address, packet);
327 if (!session_->connection()->connected()) { 327 if (!session_->connection()->connected()) {
328 return false; 328 return false;
329 } 329 }
330 330
331 return true; 331 return true;
332 } 332 }
333 333
334 } // namespace tools 334 } // namespace tools
335 } // namespace net 335 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server_session_test.cc ('k') | net/tools/quic/quic_spdy_server_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698