| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 static void set_force_spdy_always(bool value) { | 223 static void set_force_spdy_always(bool value) { |
| 224 force_spdy_always_ = value; | 224 force_spdy_always_ = value; |
| 225 } | 225 } |
| 226 static bool force_spdy_always() { return force_spdy_always_; } | 226 static bool force_spdy_always() { return force_spdy_always_; } |
| 227 | 227 |
| 228 // Add a URL to exclude from forced SPDY. | 228 // Add a URL to exclude from forced SPDY. |
| 229 static void add_forced_spdy_exclusion(const std::string& value); | 229 static void add_forced_spdy_exclusion(const std::string& value); |
| 230 // Check if a HostPortPair is excluded from using spdy. | 230 // Check if a HostPortPair is excluded from using spdy. |
| 231 static bool HasSpdyExclusion(const HostPortPair& endpoint); | 231 static bool HasSpdyExclusion(const HostPortPair& endpoint); |
| 232 | 232 |
| 233 // Sets http/1.1 as the only protocol supported via NPN. |
| 234 static void EnableNpnHttpOnly(); |
| 235 |
| 233 // Sets http/1.1 and spdy/2 (the default spdy protocol) as the protocols | 236 // Sets http/1.1 and spdy/2 (the default spdy protocol) as the protocols |
| 234 // supported. | 237 // supported via NPN. |
| 235 static void EnableNpnSpdy(); | 238 static void EnableNpnSpdy(); |
| 236 | 239 |
| 237 // Sets http/1.1 as the protocols supported. | 240 // Sets http/1.1, spdy/2, and spdy/3 as the protocols supported via NPN. |
| 238 static void EnableNpnHttpOnly(); | |
| 239 | |
| 240 // Sets http/1.1, spdy/2 and spdy/2.1 as the protocols supported. | |
| 241 // If flow-control is enabled, received WINDOW_UPDATE and SETTINGS messages | |
| 242 // are processed and outstanding window size is actually obeyed when sending | |
| 243 // data frames, and WINDOW_UPDATE messages are generated when data is | |
| 244 // consumed. | |
| 245 static void EnableFlowControl(); | |
| 246 | |
| 247 // Sets http/1.1, spdy/2, spdy/2.1 and spdy/3 as the protocols supported. | |
| 248 static void EnableNpnSpdy3(); | 241 static void EnableNpnSpdy3(); |
| 249 | 242 |
| 250 // Sets the protocols supported by NPN (next protocol negotiation) during the | 243 // Sets the protocols supported by NPN (next protocol negotiation) during the |
| 251 // SSL handshake as well as by HTTP Alternate-Protocol. | 244 // SSL handshake as well as by HTTP Alternate-Protocol. |
| 252 static void SetNextProtos(const std::vector<std::string>& value); | 245 static void SetNextProtos(const std::vector<std::string>& value); |
| 253 static bool has_next_protos() { return next_protos_ != NULL; } | 246 static bool has_next_protos() { return next_protos_ != NULL; } |
| 254 static const std::vector<std::string>& next_protos() { | 247 static const std::vector<std::string>& next_protos() { |
| 255 return *next_protos_; | 248 return *next_protos_; |
| 256 } | 249 } |
| 257 | 250 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 static bool http_pipelining_enabled_; | 292 static bool http_pipelining_enabled_; |
| 300 static uint16 testing_fixed_http_port_; | 293 static uint16 testing_fixed_http_port_; |
| 301 static uint16 testing_fixed_https_port_; | 294 static uint16 testing_fixed_https_port_; |
| 302 | 295 |
| 303 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 296 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
| 304 }; | 297 }; |
| 305 | 298 |
| 306 } // namespace net | 299 } // namespace net |
| 307 | 300 |
| 308 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 301 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| OLD | NEW |