| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/string16.h" | 12 #include "base/string16.h" |
| 13 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
| 14 #include "net/base/load_states.h" | 14 #include "net/base/load_states.h" |
| 15 #include "net/base/net_export.h" | 15 #include "net/base/net_export.h" |
| 16 | 16 |
| 17 class GURL; | 17 class GURL; |
| 18 | 18 |
| 19 namespace net { | 19 namespace net { |
| 20 | 20 |
| 21 class BoundNetLog; | 21 class BoundNetLog; |
| 22 class HostMappingRules; | 22 class HostMappingRules; |
| 23 class HostPortPair; | 23 class HostPortPair; |
| 24 class HttpAuthController; | 24 class HttpAuthController; |
| 25 class HttpNetworkSession; | 25 class HttpNetworkSession; |
| 26 class HttpPipelinedHost; |
| 26 class HttpResponseInfo; | 27 class HttpResponseInfo; |
| 27 class HttpServerProperties; | 28 class HttpServerProperties; |
| 28 class HttpStream; | 29 class HttpStream; |
| 29 class ProxyInfo; | 30 class ProxyInfo; |
| 30 class SSLCertRequestInfo; | 31 class SSLCertRequestInfo; |
| 31 class SSLInfo; | 32 class SSLInfo; |
| 32 class X509Certificate; | 33 class X509Certificate; |
| 33 struct HttpRequestInfo; | 34 struct HttpRequestInfo; |
| 34 struct SSLConfig; | 35 struct SSLConfig; |
| 35 | 36 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // errors. This is for testing. | 222 // errors. This is for testing. |
| 222 static void set_ignore_certificate_errors(bool value) { | 223 static void set_ignore_certificate_errors(bool value) { |
| 223 ignore_certificate_errors_ = value; | 224 ignore_certificate_errors_ = value; |
| 224 } | 225 } |
| 225 static bool ignore_certificate_errors() { | 226 static bool ignore_certificate_errors() { |
| 226 return ignore_certificate_errors_; | 227 return ignore_certificate_errors_; |
| 227 } | 228 } |
| 228 | 229 |
| 229 static void SetHostMappingRules(const std::string& rules); | 230 static void SetHostMappingRules(const std::string& rules); |
| 230 | 231 |
| 232 static void set_http_pipelining_enabled(bool value) { |
| 233 http_pipelining_enabled_ = value; |
| 234 } |
| 235 static bool http_pipelining_enabled() { return http_pipelining_enabled_; } |
| 236 |
| 231 protected: | 237 protected: |
| 232 HttpStreamFactory(); | 238 HttpStreamFactory(); |
| 233 | 239 |
| 234 private: | 240 private: |
| 235 static const HostMappingRules& host_mapping_rules(); | 241 static const HostMappingRules& host_mapping_rules(); |
| 236 | 242 |
| 237 static const HostMappingRules* host_mapping_rules_; | 243 static const HostMappingRules* host_mapping_rules_; |
| 238 static const std::string* next_protos_; | 244 static const std::string* next_protos_; |
| 239 static bool spdy_enabled_; | 245 static bool spdy_enabled_; |
| 240 static bool use_alternate_protocols_; | 246 static bool use_alternate_protocols_; |
| 241 static bool force_spdy_over_ssl_; | 247 static bool force_spdy_over_ssl_; |
| 242 static bool force_spdy_always_; | 248 static bool force_spdy_always_; |
| 243 static std::list<HostPortPair>* forced_spdy_exclusions_; | 249 static std::list<HostPortPair>* forced_spdy_exclusions_; |
| 244 static bool ignore_certificate_errors_; | 250 static bool ignore_certificate_errors_; |
| 251 static bool http_pipelining_enabled_; |
| 245 | 252 |
| 246 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 253 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
| 247 }; | 254 }; |
| 248 | 255 |
| 249 } // namespace net | 256 } // namespace net |
| 250 | 257 |
| 251 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 258 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| OLD | NEW |