| 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 <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 : public NetworkChangeNotifier::IPAddressObserver, | 82 : public NetworkChangeNotifier::IPAddressObserver, |
| 83 public CertDatabase::Observer { | 83 public CertDatabase::Observer { |
| 84 public: | 84 public: |
| 85 QuicStreamFactory( | 85 QuicStreamFactory( |
| 86 HostResolver* host_resolver, | 86 HostResolver* host_resolver, |
| 87 ClientSocketFactory* client_socket_factory, | 87 ClientSocketFactory* client_socket_factory, |
| 88 base::WeakPtr<HttpServerProperties> http_server_properties, | 88 base::WeakPtr<HttpServerProperties> http_server_properties, |
| 89 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory, | 89 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory, |
| 90 QuicRandom* random_generator, | 90 QuicRandom* random_generator, |
| 91 QuicClock* clock, | 91 QuicClock* clock, |
| 92 size_t max_packet_length); | 92 size_t max_packet_length, |
| 93 QuicVersionVector supported_versions); |
| 93 virtual ~QuicStreamFactory(); | 94 virtual ~QuicStreamFactory(); |
| 94 | 95 |
| 95 // Creates a new QuicHttpStream to |host_port_proxy_pair| which will be | 96 // Creates a new QuicHttpStream to |host_port_proxy_pair| which will be |
| 96 // owned by |request|. |is_https| specifies if the protocol is https or not. | 97 // owned by |request|. |is_https| specifies if the protocol is https or not. |
| 97 // |cert_verifier| is used by ProofVerifier for verifying the certificate | 98 // |cert_verifier| is used by ProofVerifier for verifying the certificate |
| 98 // chain and signature. For http, this can be null. If a matching session | 99 // chain and signature. For http, this can be null. If a matching session |
| 99 // already exists, this method will return OK. If no matching session exists, | 100 // already exists, this method will return OK. If no matching session exists, |
| 100 // this will return ERR_IO_PENDING and will invoke OnRequestComplete | 101 // this will return ERR_IO_PENDING and will invoke OnRequestComplete |
| 101 // asynchronously. | 102 // asynchronously. |
| 102 int Create(const HostPortProxyPair& host_port_proxy_pair, | 103 int Create(const HostPortProxyPair& host_port_proxy_pair, |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // Contains list of suffixes (for exmaple ".c.youtube.com", | 222 // Contains list of suffixes (for exmaple ".c.youtube.com", |
| 222 // ".googlevideo.com") of cannoncial hostnames. | 223 // ".googlevideo.com") of cannoncial hostnames. |
| 223 std::vector<std::string> cannoncial_suffixes_; | 224 std::vector<std::string> cannoncial_suffixes_; |
| 224 | 225 |
| 225 QuicConfig config_; | 226 QuicConfig config_; |
| 226 | 227 |
| 227 JobMap active_jobs_; | 228 JobMap active_jobs_; |
| 228 JobRequestsMap job_requests_map_; | 229 JobRequestsMap job_requests_map_; |
| 229 RequestMap active_requests_; | 230 RequestMap active_requests_; |
| 230 | 231 |
| 231 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 232 QuicVersionVector supported_versions_; |
| 232 | 233 |
| 233 // Each profile will (probably) have a unique port_seed_ value. This value is | 234 // Each profile will (probably) have a unique port_seed_ value. This value is |
| 234 // used to help seed a pseudo-random number generator (PortSuggester) so that | 235 // used to help seed a pseudo-random number generator (PortSuggester) so that |
| 235 // we consistently (within this profile) suggest the same ephemeral port when | 236 // we consistently (within this profile) suggest the same ephemeral port when |
| 236 // we re-connect to any given server/port. The differences between profiles | 237 // we re-connect to any given server/port. The differences between profiles |
| 237 // (probablistically) prevent two profiles from colliding in their ephemeral | 238 // (probablistically) prevent two profiles from colliding in their ephemeral |
| 238 // port requests. | 239 // port requests. |
| 239 uint64 port_seed_; | 240 uint64 port_seed_; |
| 240 | 241 |
| 242 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
| 243 |
| 241 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 244 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
| 242 }; | 245 }; |
| 243 | 246 |
| 244 } // namespace net | 247 } // namespace net |
| 245 | 248 |
| 246 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 249 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ |
| OLD | NEW |