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