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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 const QuicServerId& server_id, | 128 const QuicServerId& server_id, |
129 int yield_after_packets, | 129 int yield_after_packets, |
130 QuicTime::Delta yield_after_duration, | 130 QuicTime::Delta yield_after_duration, |
131 int cert_verify_flags, | 131 int cert_verify_flags, |
132 const QuicConfig& config, | 132 const QuicConfig& config, |
133 QuicCryptoClientConfig* crypto_config, | 133 QuicCryptoClientConfig* crypto_config, |
134 const char* const connection_description, | 134 const char* const connection_description, |
135 base::TimeTicks dns_resolution_start_time, | 135 base::TimeTicks dns_resolution_start_time, |
136 base::TimeTicks dns_resolution_end_time, | 136 base::TimeTicks dns_resolution_end_time, |
137 QuicClientPushPromiseIndex* push_promise_index, | 137 QuicClientPushPromiseIndex* push_promise_index, |
| 138 ServerPushDelegate* push_delegate, |
138 base::TaskRunner* task_runner, | 139 base::TaskRunner* task_runner, |
139 std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher, | 140 std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher, |
140 NetLog* net_log); | 141 NetLog* net_log); |
141 ~QuicChromiumClientSession() override; | 142 ~QuicChromiumClientSession() override; |
142 | 143 |
143 void Initialize() override; | 144 void Initialize() override; |
144 | 145 |
145 void AddObserver(Observer* observer); | 146 void AddObserver(Observer* observer); |
146 void RemoveObserver(Observer* observer); | 147 void RemoveObserver(Observer* observer); |
147 | 148 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 bool HasNonMigratableStreams() const; | 302 bool HasNonMigratableStreams() const; |
302 | 303 |
303 bool HandlePromised(QuicStreamId associated_id, | 304 bool HandlePromised(QuicStreamId associated_id, |
304 QuicStreamId promised_id, | 305 QuicStreamId promised_id, |
305 const SpdyHeaderBlock& headers) override; | 306 const SpdyHeaderBlock& headers) override; |
306 | 307 |
307 void DeletePromised(QuicClientPromisedInfo* promised) override; | 308 void DeletePromised(QuicClientPromisedInfo* promised) override; |
308 | 309 |
309 void OnPushStreamTimedOut(QuicStreamId stream_id) override; | 310 void OnPushStreamTimedOut(QuicStreamId stream_id) override; |
310 | 311 |
311 void set_push_delegate(ServerPushDelegate* push_delegate) { | |
312 push_delegate_ = push_delegate; | |
313 } | |
314 | |
315 // 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 |
316 // still active. Otherwise, no-op. | 313 // still active. Otherwise, no-op. |
317 void CancelPush(const GURL& url); | 314 void CancelPush(const GURL& url); |
318 | 315 |
319 const LoadTimingInfo::ConnectTiming& GetConnectTiming(); | 316 const LoadTimingInfo::ConnectTiming& GetConnectTiming(); |
320 | 317 |
321 QuicVersion GetQuicVersion() const; | 318 QuicVersion GetQuicVersion() const; |
322 | 319 |
323 protected: | 320 protected: |
324 // QuicSession methods: | 321 // QuicSession methods: |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 // the current sockets_.size() == the passed in value. | 408 // the current sockets_.size() == the passed in value. |
412 bool migration_pending_; // True while migration is underway. | 409 bool migration_pending_; // True while migration is underway. |
413 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; | 410 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; |
414 | 411 |
415 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); | 412 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); |
416 }; | 413 }; |
417 | 414 |
418 } // namespace net | 415 } // namespace net |
419 | 416 |
420 #endif // NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CLIENT_SESSION_H_ | 417 #endif // NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CLIENT_SESSION_H_ |
OLD | NEW |