| 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_HTTP_HTTP_STREAM_FACTORY_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 const SSLConfig& proxy_ssl_config, | 236 const SSLConfig& proxy_ssl_config, |
| 237 HttpStreamRequest::Delegate* delegate, | 237 HttpStreamRequest::Delegate* delegate, |
| 238 const BoundNetLog& net_log) = 0; | 238 const BoundNetLog& net_log) = 0; |
| 239 | 239 |
| 240 // Requests that enough connections for |num_streams| be opened. | 240 // Requests that enough connections for |num_streams| be opened. |
| 241 virtual void PreconnectStreams(int num_streams, | 241 virtual void PreconnectStreams(int num_streams, |
| 242 const HttpRequestInfo& info) = 0; | 242 const HttpRequestInfo& info) = 0; |
| 243 | 243 |
| 244 virtual const HostMappingRules* GetHostMappingRules() const = 0; | 244 virtual const HostMappingRules* GetHostMappingRules() const = 0; |
| 245 | 245 |
| 246 // Static settings | |
| 247 | |
| 248 // Reset all static settings to initialized values. Used to init test suite. | |
| 249 static void ResetStaticSettingsToInit(); | |
| 250 | |
| 251 // Turns spdy on or off. | |
| 252 // TODO(mmenke): Figure out if this can be made a property of the | |
| 253 // HttpNetworkSession. | |
| 254 static void set_spdy_enabled(bool value) { | |
| 255 spdy_enabled_ = value; | |
| 256 } | |
| 257 static bool spdy_enabled() { return spdy_enabled_; } | |
| 258 | |
| 259 protected: | 246 protected: |
| 260 HttpStreamFactory(); | 247 HttpStreamFactory(); |
| 261 | 248 |
| 262 private: | 249 private: |
| 263 static bool spdy_enabled_; | |
| 264 | |
| 265 url::SchemeHostPort RewriteHost(const url::SchemeHostPort& server); | 250 url::SchemeHostPort RewriteHost(const url::SchemeHostPort& server); |
| 266 | 251 |
| 267 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 252 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
| 268 }; | 253 }; |
| 269 | 254 |
| 270 } // namespace net | 255 } // namespace net |
| 271 | 256 |
| 272 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 257 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| OLD | NEW |