| 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 | 10 | 
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 115   void CloseAllSessions(int error); | 115   void CloseAllSessions(int error); | 
| 116 | 116 | 
| 117   base::Value* QuicStreamFactoryInfoToValue() const; | 117   base::Value* QuicStreamFactoryInfoToValue() const; | 
| 118 | 118 | 
| 119   // NetworkChangeNotifier::IPAddressObserver methods: | 119   // NetworkChangeNotifier::IPAddressObserver methods: | 
| 120 | 120 | 
| 121   // Until the servers support roaming, close all connections when the local | 121   // Until the servers support roaming, close all connections when the local | 
| 122   // IP address changes. | 122   // IP address changes. | 
| 123   virtual void OnIPAddressChanged() OVERRIDE; | 123   virtual void OnIPAddressChanged() OVERRIDE; | 
| 124 | 124 | 
|  | 125   bool require_confirmation() const { return require_confirmation_; } | 
|  | 126 | 
|  | 127   void set_require_confirmation(bool require_confirmation) { | 
|  | 128     require_confirmation_ = require_confirmation; | 
|  | 129   } | 
|  | 130 | 
| 125  private: | 131  private: | 
| 126   class Job; | 132   class Job; | 
| 127 | 133 | 
| 128   typedef std::map<HostPortProxyPair, QuicClientSession*> SessionMap; | 134   typedef std::map<HostPortProxyPair, QuicClientSession*> SessionMap; | 
| 129   typedef std::set<HostPortProxyPair> AliasSet; | 135   typedef std::set<HostPortProxyPair> AliasSet; | 
| 130   typedef std::map<QuicClientSession*, AliasSet> SessionAliasMap; | 136   typedef std::map<QuicClientSession*, AliasSet> SessionAliasMap; | 
| 131   typedef std::set<QuicClientSession*> SessionSet; | 137   typedef std::set<QuicClientSession*> SessionSet; | 
| 132   typedef std::map<HostPortProxyPair, QuicCryptoClientConfig*> CryptoConfigMap; | 138   typedef std::map<HostPortProxyPair, QuicCryptoClientConfig*> CryptoConfigMap; | 
| 133   typedef std::map<HostPortProxyPair, Job*> JobMap; | 139   typedef std::map<HostPortProxyPair, Job*> JobMap; | 
| 134   typedef std::map<QuicStreamRequest*, Job*> RequestMap; | 140   typedef std::map<QuicStreamRequest*, Job*> RequestMap; | 
| 135   typedef std::set<QuicStreamRequest*> RequestSet; | 141   typedef std::set<QuicStreamRequest*> RequestSet; | 
| 136   typedef std::map<Job*, RequestSet> JobRequestsMap; | 142   typedef std::map<Job*, RequestSet> JobRequestsMap; | 
| 137 | 143 | 
| 138   void OnJobComplete(Job* job, int rv); | 144   void OnJobComplete(Job* job, int rv); | 
| 139   bool HasActiveSession(const HostPortProxyPair& host_port_proxy_pair); | 145   bool HasActiveSession(const HostPortProxyPair& host_port_proxy_pair); | 
| 140   bool HasActiveJob(const HostPortProxyPair& host_port_proxy_pair); | 146   bool HasActiveJob(const HostPortProxyPair& host_port_proxy_pair); | 
| 141   QuicClientSession* CreateSession( | 147   QuicClientSession* CreateSession( | 
| 142       const HostPortProxyPair& host_port_proxy_pair, | 148       const HostPortProxyPair& host_port_proxy_pair, | 
| 143       bool is_https, | 149       bool is_https, | 
| 144       CertVerifier* cert_verifier, | 150       CertVerifier* cert_verifier, | 
| 145       const AddressList& address_list, | 151       const AddressList& address_list, | 
| 146       const BoundNetLog& net_log); | 152       const BoundNetLog& net_log); | 
| 147   void ActivateSession(const HostPortProxyPair& host_port_proxy_pair, | 153   void ActivateSession(const HostPortProxyPair& host_port_proxy_pair, | 
| 148                        QuicClientSession* session); | 154                        QuicClientSession* session); | 
| 149 | 155 | 
| 150   QuicCryptoClientConfig* GetOrCreateCryptoConfig( | 156   QuicCryptoClientConfig* GetOrCreateCryptoConfig( | 
| 151       const HostPortProxyPair& host_port_proxy_pair); | 157       const HostPortProxyPair& host_port_proxy_pair); | 
| 152 | 158 | 
|  | 159   bool require_confirmation_; | 
| 153   HostResolver* host_resolver_; | 160   HostResolver* host_resolver_; | 
| 154   ClientSocketFactory* client_socket_factory_; | 161   ClientSocketFactory* client_socket_factory_; | 
| 155   base::WeakPtr<HttpServerProperties> http_server_properties_; | 162   base::WeakPtr<HttpServerProperties> http_server_properties_; | 
| 156   QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory_; | 163   QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory_; | 
| 157   QuicRandom* random_generator_; | 164   QuicRandom* random_generator_; | 
| 158   scoped_ptr<QuicClock> clock_; | 165   scoped_ptr<QuicClock> clock_; | 
| 159 | 166 | 
| 160   // Contains owning pointers to all sessions that currently exist. | 167   // Contains owning pointers to all sessions that currently exist. | 
| 161   SessionSet all_sessions_; | 168   SessionSet all_sessions_; | 
| 162   // Contains non-owning pointers to currently active session | 169   // Contains non-owning pointers to currently active session | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 177   RequestMap active_requests_; | 184   RequestMap active_requests_; | 
| 178 | 185 | 
| 179   base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 186   base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 
| 180 | 187 | 
| 181   DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 188   DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 
| 182 }; | 189 }; | 
| 183 | 190 | 
| 184 }  // namespace net | 191 }  // namespace net | 
| 185 | 192 | 
| 186 #endif  // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 193 #endif  // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 
| OLD | NEW | 
|---|