OLD | NEW |
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_client.h" | 5 #include "net/tools/quic/quic_client.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <netinet/in.h> | 8 #include <netinet/in.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include <sys/epoll.h> | 10 #include <sys/epoll.h> |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 if (response_listener_.get() != nullptr) { | 427 if (response_listener_.get() != nullptr) { |
428 response_listener_->OnCompleteResponse(stream->id(), headers, | 428 response_listener_->OnCompleteResponse(stream->id(), headers, |
429 client_stream->data()); | 429 client_stream->data()); |
430 } | 430 } |
431 | 431 |
432 // Store response headers and body. | 432 // Store response headers and body. |
433 if (store_response_) { | 433 if (store_response_) { |
434 latest_response_code_ = headers.parsed_response_code(); | 434 latest_response_code_ = headers.parsed_response_code(); |
435 headers.DumpHeadersToString(&latest_response_headers_); | 435 headers.DumpHeadersToString(&latest_response_headers_); |
436 latest_response_body_ = client_stream->data(); | 436 latest_response_body_ = client_stream->data(); |
437 latest_response_trailers_ = client_stream->trailers().DebugString(); | 437 latest_response_trailers_ = |
| 438 client_stream->response_trailers().DebugString(); |
438 } | 439 } |
439 } | 440 } |
440 | 441 |
441 bool QuicClient::CheckVary(const SpdyHeaderBlock& client_request, | 442 bool QuicClient::CheckVary(const SpdyHeaderBlock& client_request, |
442 const SpdyHeaderBlock& promise_request, | 443 const SpdyHeaderBlock& promise_request, |
443 const SpdyHeaderBlock& promise_response) { | 444 const SpdyHeaderBlock& promise_response) { |
444 return true; | 445 return true; |
445 } | 446 } |
446 | 447 |
447 void QuicClient::OnRendezvousResult(QuicSpdyStream* stream) { | 448 void QuicClient::OnRendezvousResult(QuicSpdyStream* stream) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 return fd_address_map_.back().first; | 496 return fd_address_map_.back().first; |
496 } | 497 } |
497 | 498 |
498 void QuicClient::ProcessPacket(const IPEndPoint& self_address, | 499 void QuicClient::ProcessPacket(const IPEndPoint& self_address, |
499 const IPEndPoint& peer_address, | 500 const IPEndPoint& peer_address, |
500 const QuicEncryptedPacket& packet) { | 501 const QuicEncryptedPacket& packet) { |
501 session()->connection()->ProcessUdpPacket(self_address, peer_address, packet); | 502 session()->connection()->ProcessUdpPacket(self_address, peer_address, packet); |
502 } | 503 } |
503 | 504 |
504 } // namespace net | 505 } // namespace net |
OLD | NEW |