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

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

Issue 1423463003: Rename QuicDataStream to QuicSpdyStream. No behavior change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@105435080
Patch Set: Created 5 years, 2 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_simple_client.h ('k') | net/tools/quic/quic_spdy_client_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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 session()->connection()->SetSelfAddress(client_address_); 327 session()->connection()->SetSelfAddress(client_address_);
328 328
329 QuicPacketWriter* writer = CreateQuicPacketWriter(); 329 QuicPacketWriter* writer = CreateQuicPacketWriter();
330 DummyPacketWriterFactory factory(writer); 330 DummyPacketWriterFactory factory(writer);
331 set_writer(writer); 331 set_writer(writer);
332 session()->connection()->SetQuicPacketWriter(writer, false); 332 session()->connection()->SetQuicPacketWriter(writer, false);
333 333
334 return true; 334 return true;
335 } 335 }
336 336
337 void QuicSimpleClient::OnClose(QuicDataStream* stream) { 337 void QuicSimpleClient::OnClose(QuicSpdyStream* stream) {
338 DCHECK(stream != nullptr); 338 DCHECK(stream != nullptr);
339 QuicSpdyClientStream* client_stream = 339 QuicSpdyClientStream* client_stream =
340 static_cast<QuicSpdyClientStream*>(stream); 340 static_cast<QuicSpdyClientStream*>(stream);
341 HttpResponseInfo response; 341 HttpResponseInfo response;
342 SpdyHeadersToHttpResponse(client_stream->headers(), net::HTTP2, &response); 342 SpdyHeadersToHttpResponse(client_stream->headers(), net::HTTP2, &response);
343 if (response_listener_.get() != nullptr) { 343 if (response_listener_.get() != nullptr) {
344 response_listener_->OnCompleteResponse( 344 response_listener_->OnCompleteResponse(
345 stream->id(), *response.headers, client_stream->data()); 345 stream->id(), *response.headers, client_stream->data());
346 } 346 }
347 347
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 packet); 393 packet);
394 if (!session()->connection()->connected()) { 394 if (!session()->connection()->connected()) {
395 return false; 395 return false;
396 } 396 }
397 397
398 return true; 398 return true;
399 } 399 }
400 400
401 } // namespace tools 401 } // namespace tools
402 } // namespace net 402 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_simple_client.h ('k') | net/tools/quic/quic_spdy_client_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698