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

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

Issue 2854443003: Cancel pending stream requests as soon as a QUIC session is closed (Closed)
Patch Set: Created 3 years, 7 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/quic/chromium/quic_chromium_client_session.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 // A client specific QuicSession subclass. This class owns the underlying 5 // A client specific QuicSession subclass. This class owns the underlying
6 // QuicConnection and QuicConnectionHelper objects. The connection stores 6 // QuicConnection and QuicConnectionHelper objects. The connection stores
7 // a non-owning pointer to the helper so this session needs to ensure that 7 // a non-owning pointer to the helper so this session needs to ensure that
8 // the helper outlives the connection. 8 // the helper outlives the connection.
9 9
10 #ifndef NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CLIENT_SESSION_H_ 10 #ifndef NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CLIENT_SESSION_H_
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 // OnConnectionClosed - called by the connection when the connection has been 344 // OnConnectionClosed - called by the connection when the connection has been
345 // closed, perhaps due to a timeout or a protocol error. 345 // closed, perhaps due to a timeout or a protocol error.
346 // CloseSessionOnError - called from the owner of the session, 346 // CloseSessionOnError - called from the owner of the session,
347 // the QuicStreamFactory, when there is an error. 347 // the QuicStreamFactory, when there is an error.
348 // OnReadComplete - when there is a read error. 348 // OnReadComplete - when there is a read error.
349 // This method closes all stream and performs any necessary cleanup. 349 // This method closes all stream and performs any necessary cleanup.
350 void CloseSessionOnErrorInner(int net_error, QuicErrorCode quic_error); 350 void CloseSessionOnErrorInner(int net_error, QuicErrorCode quic_error);
351 351
352 void CloseAllStreams(int net_error); 352 void CloseAllStreams(int net_error);
353 void CloseAllObservers(int net_error); 353 void CloseAllObservers(int net_error);
354 void CancelAllRequests(int net_error);
354 355
355 // Notifies the factory that this session is going away and no more streams 356 // Notifies the factory that this session is going away and no more streams
356 // should be created from it. This needs to be called before closing any 357 // should be created from it. This needs to be called before closing any
357 // streams, because closing a stream may cause a new stream to be created. 358 // streams, because closing a stream may cause a new stream to be created.
358 void NotifyFactoryOfSessionGoingAway(); 359 void NotifyFactoryOfSessionGoingAway();
359 360
360 // Posts a task to notify the factory that this session has been closed. 361 // Posts a task to notify the factory that this session has been closed.
361 void NotifyFactoryOfSessionClosedLater(); 362 void NotifyFactoryOfSessionClosedLater();
362 363
363 // Notifies the factory that this session has been closed which will 364 // Notifies the factory that this session has been closed which will
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 // the current sockets_.size() == the passed in value. 408 // the current sockets_.size() == the passed in value.
408 bool migration_pending_; // True while migration is underway. 409 bool migration_pending_; // True while migration is underway.
409 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; 410 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_;
410 411
411 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); 412 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession);
412 }; 413 };
413 414
414 } // namespace net 415 } // namespace net
415 416
416 #endif // NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CLIENT_SESSION_H_ 417 #endif // NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/chromium/quic_chromium_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698