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 // 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 void OnPushStreamTimedOut(QuicStreamId stream_id) override; | 310 void OnPushStreamTimedOut(QuicStreamId stream_id) override; |
311 | 311 |
312 // Cancels the push if the push stream for |url| has not been claimed and is | 312 // Cancels the push if the push stream for |url| has not been claimed and is |
313 // still active. Otherwise, no-op. | 313 // still active. Otherwise, no-op. |
314 void CancelPush(const GURL& url); | 314 void CancelPush(const GURL& url); |
315 | 315 |
316 const LoadTimingInfo::ConnectTiming& GetConnectTiming(); | 316 const LoadTimingInfo::ConnectTiming& GetConnectTiming(); |
317 | 317 |
318 QuicVersion GetQuicVersion() const; | 318 QuicVersion GetQuicVersion() const; |
319 | 319 |
| 320 // Returns estimated memory usage in bytes. |
| 321 // See base/trace_event/memory_usage_estimator.h. |
| 322 size_t EstimateMemoryUsage() const; |
| 323 |
320 protected: | 324 protected: |
321 // QuicSession methods: | 325 // QuicSession methods: |
322 bool ShouldCreateIncomingDynamicStream(QuicStreamId id) override; | 326 bool ShouldCreateIncomingDynamicStream(QuicStreamId id) override; |
323 bool ShouldCreateOutgoingDynamicStream() override; | 327 bool ShouldCreateOutgoingDynamicStream() override; |
324 | 328 |
325 QuicChromiumClientStream* CreateIncomingDynamicStream( | 329 QuicChromiumClientStream* CreateIncomingDynamicStream( |
326 QuicStreamId id) override; | 330 QuicStreamId id) override; |
327 | 331 |
328 private: | 332 private: |
329 friend class test::QuicChromiumClientSessionPeer; | 333 friend class test::QuicChromiumClientSessionPeer; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 // the current sockets_.size() == the passed in value. | 412 // the current sockets_.size() == the passed in value. |
409 bool migration_pending_; // True while migration is underway. | 413 bool migration_pending_; // True while migration is underway. |
410 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; | 414 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; |
411 | 415 |
412 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); | 416 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); |
413 }; | 417 }; |
414 | 418 |
415 } // namespace net | 419 } // namespace net |
416 | 420 |
417 #endif // NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CLIENT_SESSION_H_ | 421 #endif // NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CLIENT_SESSION_H_ |
OLD | NEW |