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> |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "net/log/net_log.h" | 22 #include "net/log/net_log.h" |
23 #include "net/proxy/proxy_server.h" | 23 #include "net/proxy/proxy_server.h" |
24 #include "net/quic/network_connection.h" | 24 #include "net/quic/network_connection.h" |
25 #include "net/quic/quic_chromium_client_session.h" | 25 #include "net/quic/quic_chromium_client_session.h" |
26 #include "net/quic/quic_config.h" | 26 #include "net/quic/quic_config.h" |
27 #include "net/quic/quic_crypto_stream.h" | 27 #include "net/quic/quic_crypto_stream.h" |
28 #include "net/quic/quic_http_stream.h" | 28 #include "net/quic/quic_http_stream.h" |
29 #include "net/quic/quic_protocol.h" | 29 #include "net/quic/quic_protocol.h" |
30 #include "net/ssl/ssl_config_service.h" | 30 #include "net/ssl/ssl_config_service.h" |
31 | 31 |
| 32 using NetworkChangeNotifier::NetworkHandle; |
| 33 |
32 namespace net { | 34 namespace net { |
33 | 35 |
34 class CertPolicyEnforcer; | 36 class CertPolicyEnforcer; |
35 class CertVerifier; | 37 class CertVerifier; |
36 class ChannelIDService; | 38 class ChannelIDService; |
37 class ClientSocketFactory; | 39 class ClientSocketFactory; |
38 class HostResolver; | 40 class HostResolver; |
39 class HttpServerProperties; | 41 class HttpServerProperties; |
40 class QuicClock; | 42 class QuicClock; |
41 class QuicChromiumClientSession; | 43 class QuicChromiumClientSession; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 CompletionCallback callback_; | 100 CompletionCallback callback_; |
99 scoped_ptr<QuicHttpStream> stream_; | 101 scoped_ptr<QuicHttpStream> stream_; |
100 | 102 |
101 DISALLOW_COPY_AND_ASSIGN(QuicStreamRequest); | 103 DISALLOW_COPY_AND_ASSIGN(QuicStreamRequest); |
102 }; | 104 }; |
103 | 105 |
104 // A factory for creating new QuicHttpStreams on top of a pool of | 106 // A factory for creating new QuicHttpStreams on top of a pool of |
105 // QuicChromiumClientSessions. | 107 // QuicChromiumClientSessions. |
106 class NET_EXPORT_PRIVATE QuicStreamFactory | 108 class NET_EXPORT_PRIVATE QuicStreamFactory |
107 : public NetworkChangeNotifier::IPAddressObserver, | 109 : public NetworkChangeNotifier::IPAddressObserver, |
| 110 public NetworkChangeNotifier::NetworkObserver, |
108 public SSLConfigService::Observer, | 111 public SSLConfigService::Observer, |
109 public CertDatabase::Observer { | 112 public CertDatabase::Observer { |
110 public: | 113 public: |
111 QuicStreamFactory( | 114 QuicStreamFactory( |
112 HostResolver* host_resolver, | 115 HostResolver* host_resolver, |
113 ClientSocketFactory* client_socket_factory, | 116 ClientSocketFactory* client_socket_factory, |
114 base::WeakPtr<HttpServerProperties> http_server_properties, | 117 base::WeakPtr<HttpServerProperties> http_server_properties, |
115 CertVerifier* cert_verifier, | 118 CertVerifier* cert_verifier, |
116 CertPolicyEnforcer* cert_policy_enforcer, | 119 CertPolicyEnforcer* cert_policy_enforcer, |
117 ChannelIDService* channel_id_service, | 120 ChannelIDService* channel_id_service, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 | 202 |
200 // Delete all cached state objects in |crypto_config_|. | 203 // Delete all cached state objects in |crypto_config_|. |
201 void ClearCachedStatesInCryptoConfig(); | 204 void ClearCachedStatesInCryptoConfig(); |
202 | 205 |
203 // NetworkChangeNotifier::IPAddressObserver methods: | 206 // NetworkChangeNotifier::IPAddressObserver methods: |
204 | 207 |
205 // Until the servers support roaming, close all connections when the local | 208 // Until the servers support roaming, close all connections when the local |
206 // IP address changes. | 209 // IP address changes. |
207 void OnIPAddressChanged() override; | 210 void OnIPAddressChanged() override; |
208 | 211 |
| 212 // NetworkChangeNotifier::NetworkObserver methods: |
| 213 void OnNetworkConnected(NetworkHandle network) override; |
| 214 void OnNetworkDisconnected(NetworkHandle network) override; |
| 215 void OnNetworkSoonToDisconnect(NetworkHandle network) override; |
| 216 void OnNetworkMadeDefault(NetworkHandle network) override; |
| 217 |
209 // SSLConfigService::Observer methods: | 218 // SSLConfigService::Observer methods: |
210 | 219 |
211 // We perform the same flushing as described above when SSL settings change. | 220 // We perform the same flushing as described above when SSL settings change. |
212 void OnSSLConfigChanged() override; | 221 void OnSSLConfigChanged() override; |
213 | 222 |
214 // CertDatabase::Observer methods: | 223 // CertDatabase::Observer methods: |
215 | 224 |
216 // We close all sessions when certificate database is changed. | 225 // We close all sessions when certificate database is changed. |
217 void OnCertAdded(const X509Certificate* cert) override; | 226 void OnCertAdded(const X509Certificate* cert) override; |
218 void OnCACertChanged(const X509Certificate* cert) override; | 227 void OnCACertChanged(const X509Certificate* cert) override; |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 base::TaskRunner* task_runner_; | 477 base::TaskRunner* task_runner_; |
469 | 478 |
470 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 479 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
471 | 480 |
472 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 481 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
473 }; | 482 }; |
474 | 483 |
475 } // namespace net | 484 } // namespace net |
476 | 485 |
477 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 486 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ |
OLD | NEW |