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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 // supported via NPN. | 239 // supported via NPN. |
240 static void EnableNpnSpdy(); | 240 static void EnableNpnSpdy(); |
241 | 241 |
242 // Sets http/1.1, spdy/2, and spdy/3 as the protocols supported via NPN. | 242 // Sets http/1.1, spdy/2, and spdy/3 as the protocols supported via NPN. |
243 static void EnableNpnSpdy3(); | 243 static void EnableNpnSpdy3(); |
244 | 244 |
245 // Sets http/1.1, spdy/2, spdy/3, and spdy/3.1 as the protocols | 245 // Sets http/1.1, spdy/2, spdy/3, and spdy/3.1 as the protocols |
246 // supported via NPN. | 246 // supported via NPN. |
247 static void EnableNpnSpdy31(); | 247 static void EnableNpnSpdy31(); |
248 | 248 |
| 249 // Sets http/1.1, spdy/2, spdy/3, spdy/3.1, and spdy/4a1 as the |
| 250 // protocols supported via NPN. |
| 251 static void EnableNpnSpdy4a1(); |
| 252 |
249 // Sets the protocols supported by NPN (next protocol negotiation) during the | 253 // Sets the protocols supported by NPN (next protocol negotiation) during the |
250 // SSL handshake as well as by HTTP Alternate-Protocol. | 254 // SSL handshake as well as by HTTP Alternate-Protocol. |
251 static void SetNextProtos(const std::vector<std::string>& value); | 255 static void SetNextProtos(const std::vector<std::string>& value); |
252 static bool has_next_protos() { return next_protos_ != NULL; } | 256 static bool has_next_protos() { return next_protos_ != NULL; } |
253 static const std::vector<std::string>& next_protos() { | 257 static const std::vector<std::string>& next_protos() { |
254 return *next_protos_; | 258 return *next_protos_; |
255 } | 259 } |
256 | 260 |
257 protected: | 261 protected: |
258 HttpStreamFactory(); | 262 HttpStreamFactory(); |
259 | 263 |
260 private: | 264 private: |
261 static std::vector<std::string>* next_protos_; | 265 static std::vector<std::string>* next_protos_; |
262 static bool enabled_protocols_[NUM_ALTERNATE_PROTOCOLS]; | 266 static bool enabled_protocols_[NUM_ALTERNATE_PROTOCOLS]; |
263 static bool spdy_enabled_; | 267 static bool spdy_enabled_; |
264 static bool use_alternate_protocols_; | 268 static bool use_alternate_protocols_; |
265 static bool force_spdy_over_ssl_; | 269 static bool force_spdy_over_ssl_; |
266 static bool force_spdy_always_; | 270 static bool force_spdy_always_; |
267 static std::list<HostPortPair>* forced_spdy_exclusions_; | 271 static std::list<HostPortPair>* forced_spdy_exclusions_; |
268 | 272 |
269 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 273 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
270 }; | 274 }; |
271 | 275 |
272 } // namespace net | 276 } // namespace net |
273 | 277 |
274 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 278 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
OLD | NEW |