| 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/quic/chromium/quic_chromium_client_session.h" | 5 #include "net/quic/chromium/quic_chromium_client_session.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 if (!session_) | 347 if (!session_) |
| 348 return ERR_CONNECTION_CLOSED; | 348 return ERR_CONNECTION_CLOSED; |
| 349 | 349 |
| 350 *address = session_->peer_address().impl().socket_address(); | 350 *address = session_->peer_address().impl().socket_address(); |
| 351 return OK; | 351 return OK; |
| 352 } | 352 } |
| 353 | 353 |
| 354 QuicChromiumClientSession::StreamRequest::StreamRequest( | 354 QuicChromiumClientSession::StreamRequest::StreamRequest( |
| 355 QuicChromiumClientSession::Handle* session, | 355 QuicChromiumClientSession::Handle* session, |
| 356 bool requires_confirmation) | 356 bool requires_confirmation) |
| 357 : session_(std::move(session)), | 357 : session_(session), |
| 358 requires_confirmation_(requires_confirmation), | 358 requires_confirmation_(requires_confirmation), |
| 359 stream_(nullptr), | 359 stream_(nullptr), |
| 360 weak_factory_(this) {} | 360 weak_factory_(this) {} |
| 361 | 361 |
| 362 QuicChromiumClientSession::StreamRequest::~StreamRequest() { | 362 QuicChromiumClientSession::StreamRequest::~StreamRequest() { |
| 363 if (stream_) | 363 if (stream_) |
| 364 stream_->Reset(QUIC_STREAM_CANCELLED); | 364 stream_->Reset(QUIC_STREAM_CANCELLED); |
| 365 | 365 |
| 366 if (session_->IsConnected()) | 366 if (session_->IsConnected()) |
| 367 session_->CancelRequest(this); | 367 session_->CancelRequest(this); |
| (...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1760 } | 1760 } |
| 1761 | 1761 |
| 1762 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { | 1762 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { |
| 1763 // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's | 1763 // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's |
| 1764 // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and | 1764 // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and |
| 1765 // unacked packet map. | 1765 // unacked packet map. |
| 1766 return base::trace_event::EstimateMemoryUsage(packet_readers_); | 1766 return base::trace_event::EstimateMemoryUsage(packet_readers_); |
| 1767 } | 1767 } |
| 1768 | 1768 |
| 1769 } // namespace net | 1769 } // namespace net |
| OLD | NEW |