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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 static void SetNextProtos(const std::vector<NextProto>& value); | 291 static void SetNextProtos(const std::vector<NextProto>& value); |
292 static bool has_next_protos() { return next_protos_ != NULL; } | 292 static bool has_next_protos() { return next_protos_ != NULL; } |
293 static const std::vector<std::string>& next_protos() { | 293 static const std::vector<std::string>& next_protos() { |
294 return *next_protos_; | 294 return *next_protos_; |
295 } | 295 } |
296 | 296 |
297 protected: | 297 protected: |
298 HttpStreamFactory(); | 298 HttpStreamFactory(); |
299 | 299 |
300 private: | 300 private: |
| 301 // |protocol| must be a valid protocol value. |
| 302 static bool IsProtocolEnabled(AlternateProtocol protocol); |
| 303 static void SetProtocolEnabled(AlternateProtocol protocol); |
| 304 static void ResetEnabledProtocols(); |
| 305 |
301 static std::vector<std::string>* next_protos_; | 306 static std::vector<std::string>* next_protos_; |
302 static bool enabled_protocols_[NUM_ALTERNATE_PROTOCOLS]; | 307 static bool enabled_protocols_[NUM_VALID_ALTERNATE_PROTOCOLS]; |
303 static bool spdy_enabled_; | 308 static bool spdy_enabled_; |
304 static bool use_alternate_protocols_; | 309 static bool use_alternate_protocols_; |
305 static bool force_spdy_over_ssl_; | 310 static bool force_spdy_over_ssl_; |
306 static bool force_spdy_always_; | 311 static bool force_spdy_always_; |
307 static std::list<HostPortPair>* forced_spdy_exclusions_; | 312 static std::list<HostPortPair>* forced_spdy_exclusions_; |
308 | 313 |
309 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 314 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
310 }; | 315 }; |
311 | 316 |
312 } // namespace net | 317 } // namespace net |
313 | 318 |
314 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 319 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
OLD | NEW |