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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 WebSocketHandshakeStreamBase::CreateHelper* create_helper, | 209 WebSocketHandshakeStreamBase::CreateHelper* create_helper, |
210 const BoundNetLog& net_log) = 0; | 210 const BoundNetLog& net_log) = 0; |
211 | 211 |
212 // Requests that enough connections for |num_streams| be opened. | 212 // Requests that enough connections for |num_streams| be opened. |
213 virtual void PreconnectStreams(int num_streams, | 213 virtual void PreconnectStreams(int num_streams, |
214 const HttpRequestInfo& info, | 214 const HttpRequestInfo& info, |
215 RequestPriority priority, | 215 RequestPriority priority, |
216 const SSLConfig& server_ssl_config, | 216 const SSLConfig& server_ssl_config, |
217 const SSLConfig& proxy_ssl_config) = 0; | 217 const SSLConfig& proxy_ssl_config) = 0; |
218 | 218 |
219 // If pipelining is supported, creates a Value summary of the currently active | |
220 // pipelines. Caller assumes ownership of the returned value. Otherwise, | |
221 // returns an empty Value. | |
222 virtual base::Value* PipelineInfoToValue() const = 0; | |
223 | |
224 virtual const HostMappingRules* GetHostMappingRules() const = 0; | 219 virtual const HostMappingRules* GetHostMappingRules() const = 0; |
225 | 220 |
226 // Static settings | 221 // Static settings |
227 | 222 |
228 // Reset all static settings to initialized values. Used to init test suite. | 223 // Reset all static settings to initialized values. Used to init test suite. |
229 static void ResetStaticSettingsToInit(); | 224 static void ResetStaticSettingsToInit(); |
230 | 225 |
231 // Turns spdy on or off. | 226 // Turns spdy on or off. |
232 // TODO(mmenke): Figure out if this can be made a property of the | 227 // TODO(mmenke): Figure out if this can be made a property of the |
233 // HttpNetworkSession. | 228 // HttpNetworkSession. |
234 static void set_spdy_enabled(bool value) { | 229 static void set_spdy_enabled(bool value) { |
235 spdy_enabled_ = value; | 230 spdy_enabled_ = value; |
236 } | 231 } |
237 static bool spdy_enabled() { return spdy_enabled_; } | 232 static bool spdy_enabled() { return spdy_enabled_; } |
238 | 233 |
239 protected: | 234 protected: |
240 HttpStreamFactory(); | 235 HttpStreamFactory(); |
241 | 236 |
242 private: | 237 private: |
243 static bool spdy_enabled_; | 238 static bool spdy_enabled_; |
244 | 239 |
245 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 240 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
246 }; | 241 }; |
247 | 242 |
248 } // namespace net | 243 } // namespace net |
249 | 244 |
250 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 245 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
OLD | NEW |