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

Side by Side Diff: net/quic/chromium/quic_chromium_client_session.cc

Issue 2922883002: Don't move raw pointers in net (Closed)
Patch Set: Created 3 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 | « no previous file | net/url_request/url_request_unittest.cc » ('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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698