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 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/string16.h" | 14 #include "base/string16.h" |
15 #include "net/base/completion_callback.h" | 15 #include "net/base/completion_callback.h" |
16 #include "net/base/load_states.h" | 16 #include "net/base/load_states.h" |
17 #include "net/base/net_export.h" | 17 #include "net/base/net_export.h" |
| 18 #include "net/http/http_server_properties.h" |
18 #include "net/socket/ssl_client_socket.h" | 19 #include "net/socket/ssl_client_socket.h" |
19 | 20 |
20 class GURL; | 21 class GURL; |
21 | 22 |
22 namespace base { | 23 namespace base { |
23 class Value; | 24 class Value; |
24 } | 25 } |
25 | 26 |
26 namespace net { | 27 namespace net { |
27 | 28 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 static void set_testing_fixed_http_port(int port) { | 260 static void set_testing_fixed_http_port(int port) { |
260 testing_fixed_http_port_ = port; | 261 testing_fixed_http_port_ = port; |
261 } | 262 } |
262 static uint16 testing_fixed_http_port() { return testing_fixed_http_port_; } | 263 static uint16 testing_fixed_http_port() { return testing_fixed_http_port_; } |
263 | 264 |
264 static void set_testing_fixed_https_port(int port) { | 265 static void set_testing_fixed_https_port(int port) { |
265 testing_fixed_https_port_ = port; | 266 testing_fixed_https_port_ = port; |
266 } | 267 } |
267 static uint16 testing_fixed_https_port() { return testing_fixed_https_port_; } | 268 static uint16 testing_fixed_https_port() { return testing_fixed_https_port_; } |
268 | 269 |
| 270 static void set_supported_spdy_version(AlternateProtocol protocol) { |
| 271 supported_spdy_version_ = protocol; |
| 272 } |
| 273 static AlternateProtocol supported_spdy_version() { |
| 274 return supported_spdy_version_; |
| 275 } |
| 276 |
269 protected: | 277 protected: |
270 HttpStreamFactory(); | 278 HttpStreamFactory(); |
271 | 279 |
272 private: | 280 private: |
273 static const HostMappingRules& host_mapping_rules(); | 281 static const HostMappingRules& host_mapping_rules(); |
274 | 282 |
275 static const HostMappingRules* host_mapping_rules_; | 283 static const HostMappingRules* host_mapping_rules_; |
276 static std::vector<std::string>* next_protos_; | 284 static std::vector<std::string>* next_protos_; |
277 static bool spdy_enabled_; | 285 static bool spdy_enabled_; |
278 static bool use_alternate_protocols_; | 286 static bool use_alternate_protocols_; |
279 static bool force_spdy_over_ssl_; | 287 static bool force_spdy_over_ssl_; |
280 static bool force_spdy_always_; | 288 static bool force_spdy_always_; |
281 static std::list<HostPortPair>* forced_spdy_exclusions_; | 289 static std::list<HostPortPair>* forced_spdy_exclusions_; |
282 static bool ignore_certificate_errors_; | 290 static bool ignore_certificate_errors_; |
283 static bool http_pipelining_enabled_; | 291 static bool http_pipelining_enabled_; |
284 static uint16 testing_fixed_http_port_; | 292 static uint16 testing_fixed_http_port_; |
285 static uint16 testing_fixed_https_port_; | 293 static uint16 testing_fixed_https_port_; |
| 294 static AlternateProtocol supported_spdy_version_; |
286 | 295 |
287 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 296 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
288 }; | 297 }; |
289 | 298 |
290 } // namespace net | 299 } // namespace net |
291 | 300 |
292 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 301 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
OLD | NEW |