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_QUIC_CHROMIUM_CLIENT_SESSION_H_ | 10 #ifndef NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
124 const QuicServerId& server_id, | 124 const QuicServerId& server_id, |
125 int yield_after_packets, | 125 int yield_after_packets, |
126 QuicTime::Delta yield_after_duration, | 126 QuicTime::Delta yield_after_duration, |
127 int cert_verify_flags, | 127 int cert_verify_flags, |
128 const QuicConfig& config, | 128 const QuicConfig& config, |
129 QuicCryptoClientConfig* crypto_config, | 129 QuicCryptoClientConfig* crypto_config, |
130 const char* const connection_description, | 130 const char* const connection_description, |
131 base::TimeTicks dns_resolution_start_time, | 131 base::TimeTicks dns_resolution_start_time, |
132 base::TimeTicks dns_resolution_end_time, | 132 base::TimeTicks dns_resolution_end_time, |
133 QuicClientPushPromiseIndex* push_promise_index, | 133 QuicClientPushPromiseIndex* push_promise_index, |
134 ServerPushDelegate* push_delegate, | |
Ryan Hamilton
2016/11/23 20:43:30
Should this method DCHECK that push_delegate is no
Zhongyi Shi
2016/11/23 23:53:49
Nope. The push_delegate will be null if we don't e
| |
134 base::TaskRunner* task_runner, | 135 base::TaskRunner* task_runner, |
135 std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher, | 136 std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher, |
136 NetLog* net_log); | 137 NetLog* net_log); |
137 ~QuicChromiumClientSession() override; | 138 ~QuicChromiumClientSession() override; |
138 | 139 |
139 void Initialize() override; | 140 void Initialize() override; |
140 | 141 |
141 void AddObserver(Observer* observer); | 142 void AddObserver(Observer* observer); |
142 void RemoveObserver(Observer* observer); | 143 void RemoveObserver(Observer* observer); |
143 | 144 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
300 bool HasNonMigratableStreams() const; | 301 bool HasNonMigratableStreams() const; |
301 | 302 |
302 bool HandlePromised(QuicStreamId associated_id, | 303 bool HandlePromised(QuicStreamId associated_id, |
303 QuicStreamId promised_id, | 304 QuicStreamId promised_id, |
304 const SpdyHeaderBlock& headers) override; | 305 const SpdyHeaderBlock& headers) override; |
305 | 306 |
306 void DeletePromised(QuicClientPromisedInfo* promised) override; | 307 void DeletePromised(QuicClientPromisedInfo* promised) override; |
307 | 308 |
308 void OnPushStreamTimedOut(QuicStreamId stream_id) override; | 309 void OnPushStreamTimedOut(QuicStreamId stream_id) override; |
309 | 310 |
310 void set_push_delegate(ServerPushDelegate* push_delegate) { | |
311 push_delegate_ = push_delegate; | |
312 } | |
313 | |
314 // Cancels the push if the push stream for |url| has not been claimed and is | 311 // Cancels the push if the push stream for |url| has not been claimed and is |
315 // still active. Otherwise, no-op. | 312 // still active. Otherwise, no-op. |
316 void CancelPush(const GURL& url); | 313 void CancelPush(const GURL& url); |
317 | 314 |
318 const LoadTimingInfo::ConnectTiming& GetConnectTiming(); | 315 const LoadTimingInfo::ConnectTiming& GetConnectTiming(); |
319 | 316 |
320 QuicVersion GetQuicVersion() const; | 317 QuicVersion GetQuicVersion() const; |
321 | 318 |
322 protected: | 319 protected: |
323 // QuicSession methods: | 320 // QuicSession methods: |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
410 // the current sockets_.size() == the passed in value. | 407 // the current sockets_.size() == the passed in value. |
411 bool migration_pending_; // True while migration is underway. | 408 bool migration_pending_; // True while migration is underway. |
412 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; | 409 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; |
413 | 410 |
414 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); | 411 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); |
415 }; | 412 }; |
416 | 413 |
417 } // namespace net | 414 } // namespace net |
418 | 415 |
419 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ | 416 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ |
OLD | NEW |