| 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> |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 static void EnableNpnSpdy3(); | 240 static void EnableNpnSpdy3(); |
| 241 | 241 |
| 242 // Sets the protocols supported by NPN (next protocol negotiation) during the | 242 // Sets the protocols supported by NPN (next protocol negotiation) during the |
| 243 // SSL handshake as well as by HTTP Alternate-Protocol. | 243 // SSL handshake as well as by HTTP Alternate-Protocol. |
| 244 static void SetNextProtos(const std::vector<std::string>& value); | 244 static void SetNextProtos(const std::vector<std::string>& value); |
| 245 static bool has_next_protos() { return next_protos_ != NULL; } | 245 static bool has_next_protos() { return next_protos_ != NULL; } |
| 246 static const std::vector<std::string>& next_protos() { | 246 static const std::vector<std::string>& next_protos() { |
| 247 return *next_protos_; | 247 return *next_protos_; |
| 248 } | 248 } |
| 249 | 249 |
| 250 // Sets QUIC to be used for all requests on the specified port. |
| 251 static void set_force_quic_port(int port) { |
| 252 force_quic_port_ = port; |
| 253 } |
| 254 static int force_quic_port() { |
| 255 return force_quic_port_; |
| 256 } |
| 257 |
| 250 protected: | 258 protected: |
| 251 HttpStreamFactory(); | 259 HttpStreamFactory(); |
| 252 | 260 |
| 253 private: | 261 private: |
| 254 static std::vector<std::string>* next_protos_; | 262 static std::vector<std::string>* next_protos_; |
| 255 static bool enabled_protocols_[NUM_ALTERNATE_PROTOCOLS]; | 263 static bool enabled_protocols_[NUM_ALTERNATE_PROTOCOLS]; |
| 256 static bool spdy_enabled_; | 264 static bool spdy_enabled_; |
| 257 static bool use_alternate_protocols_; | 265 static bool use_alternate_protocols_; |
| 258 static bool force_spdy_over_ssl_; | 266 static bool force_spdy_over_ssl_; |
| 259 static bool force_spdy_always_; | 267 static bool force_spdy_always_; |
| 268 static int force_quic_port_; |
| 260 static std::list<HostPortPair>* forced_spdy_exclusions_; | 269 static std::list<HostPortPair>* forced_spdy_exclusions_; |
| 261 | 270 |
| 262 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 271 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
| 263 }; | 272 }; |
| 264 | 273 |
| 265 } // namespace net | 274 } // namespace net |
| 266 | 275 |
| 267 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 276 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| OLD | NEW |