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 #ifndef NET_QUIC_QUIC_STREAM_FACTORY_H_ | 5 #ifndef NET_QUIC_QUIC_STREAM_FACTORY_H_ |
6 #define NET_QUIC_QUIC_STREAM_FACTORY_H_ | 6 #define NET_QUIC_QUIC_STREAM_FACTORY_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "net/base/address_list.h" | 15 #include "net/base/address_list.h" |
16 #include "net/base/completion_callback.h" | 16 #include "net/base/completion_callback.h" |
17 #include "net/base/host_port_pair.h" | 17 #include "net/base/host_port_pair.h" |
18 #include "net/base/net_log.h" | 18 #include "net/base/net_log.h" |
19 #include "net/base/network_change_notifier.h" | 19 #include "net/base/network_change_notifier.h" |
20 #include "net/cert/cert_database.h" | 20 #include "net/cert/cert_database.h" |
| 21 #include "net/http/http_server_properties.h" |
21 #include "net/proxy/proxy_server.h" | 22 #include "net/proxy/proxy_server.h" |
22 #include "net/quic/network_connection.h" | 23 #include "net/quic/network_connection.h" |
23 #include "net/quic/quic_config.h" | 24 #include "net/quic/quic_config.h" |
24 #include "net/quic/quic_crypto_stream.h" | 25 #include "net/quic/quic_crypto_stream.h" |
25 #include "net/quic/quic_http_stream.h" | 26 #include "net/quic/quic_http_stream.h" |
26 #include "net/quic/quic_protocol.h" | 27 #include "net/quic/quic_protocol.h" |
27 | 28 |
28 namespace net { | 29 namespace net { |
29 | 30 |
30 class CertVerifier; | 31 class CertVerifier; |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 void ActivateSession(const QuicServerId& key, | 243 void ActivateSession(const QuicServerId& key, |
243 QuicClientSession* session); | 244 QuicClientSession* session); |
244 | 245 |
245 // Returns |srtt| in micro seconds from ServerNetworkStats. Returns 0 if there | 246 // Returns |srtt| in micro seconds from ServerNetworkStats. Returns 0 if there |
246 // is no |http_server_properties_| or if |http_server_properties_| doesn't | 247 // is no |http_server_properties_| or if |http_server_properties_| doesn't |
247 // have ServerNetworkStats for the given |server_id|. | 248 // have ServerNetworkStats for the given |server_id|. |
248 int64 GetServerNetworkStatsSmoothedRttInMicroseconds( | 249 int64 GetServerNetworkStatsSmoothedRttInMicroseconds( |
249 const QuicServerId& server_id) const; | 250 const QuicServerId& server_id) const; |
250 | 251 |
251 // Helped methods. | 252 // Helped methods. |
252 bool WasAlternateProtocolRecentlyBroken(const QuicServerId& server_id) const; | 253 bool WasAlternateProtocolRecentlyBroken( |
| 254 const QuicServerId& server_id, |
| 255 const AlternateProtocolInfo& alternat_protocol) const; |
253 bool CryptoConfigCacheIsEmpty(const QuicServerId& server_id); | 256 bool CryptoConfigCacheIsEmpty(const QuicServerId& server_id); |
254 | 257 |
255 // Initializes the cached state associated with |server_id| in | 258 // Initializes the cached state associated with |server_id| in |
256 // |crypto_config_| with the information in |server_info|. | 259 // |crypto_config_| with the information in |server_info|. |
257 void InitializeCachedStateInCryptoConfig( | 260 void InitializeCachedStateInCryptoConfig( |
258 const QuicServerId& server_id, | 261 const QuicServerId& server_id, |
259 const scoped_ptr<QuicServerInfo>& server_info); | 262 const scoped_ptr<QuicServerInfo>& server_info); |
260 | 263 |
261 void ProcessGoingAwaySession(QuicClientSession* session, | 264 void ProcessGoingAwaySession(QuicClientSession* session, |
262 const QuicServerId& server_id, | 265 const QuicServerId& server_id, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 base::TaskRunner* task_runner_; | 353 base::TaskRunner* task_runner_; |
351 | 354 |
352 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 355 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
353 | 356 |
354 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 357 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
355 }; | 358 }; |
356 | 359 |
357 } // namespace net | 360 } // namespace net |
358 | 361 |
359 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 362 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ |
OLD | NEW |