Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: net/http/http_server_properties.h

Issue 2362233002: Remove HttpNetworkSession::enabled_protocols_. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/http/http_server_properties.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SERVER_PROPERTIES_H_ 5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_H_
6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_H_ 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN = 3, 60 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN = 3,
61 BROKEN_ALTERNATE_PROTOCOL_LOCATION_MAX, 61 BROKEN_ALTERNATE_PROTOCOL_LOCATION_MAX,
62 }; 62 };
63 63
64 // Log a histogram to reflect |location|. 64 // Log a histogram to reflect |location|.
65 NET_EXPORT void HistogramBrokenAlternateProtocolLocation( 65 NET_EXPORT void HistogramBrokenAlternateProtocolLocation(
66 BrokenAlternateProtocolLocation location); 66 BrokenAlternateProtocolLocation location);
67 67
68 enum AlternateProtocol { 68 enum AlternateProtocol {
69 NPN_HTTP_2, 69 NPN_HTTP_2,
70 ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION = NPN_HTTP_2,
Ryan Hamilton 2016/09/23 19:23:22 But, but, but... what if in 2025 we want to do ano
Bence 2016/09/23 20:05:18 https://www.google.com/search?q=yagni
71 QUIC, 70 QUIC,
72 ALTERNATE_PROTOCOL_MAXIMUM_VALID_VERSION = QUIC,
73 UNINITIALIZED_ALTERNATE_PROTOCOL, 71 UNINITIALIZED_ALTERNATE_PROTOCOL,
74 }; 72 };
75 73
76 // Simply returns whether |protocol| is between
77 // ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION and
78 // ALTERNATE_PROTOCOL_MAXIMUM_VALID_VERSION (inclusive).
79 NET_EXPORT bool IsAlternateProtocolValid(AlternateProtocol protocol); 74 NET_EXPORT bool IsAlternateProtocolValid(AlternateProtocol protocol);
80 75
81 enum AlternateProtocolSize {
82 NUM_VALID_ALTERNATE_PROTOCOLS =
83 ALTERNATE_PROTOCOL_MAXIMUM_VALID_VERSION -
84 ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION + 1,
85 };
86
87 NET_EXPORT const char* AlternateProtocolToString(AlternateProtocol protocol); 76 NET_EXPORT const char* AlternateProtocolToString(AlternateProtocol protocol);
88 NET_EXPORT AlternateProtocol AlternateProtocolFromString( 77 NET_EXPORT AlternateProtocol AlternateProtocolFromString(
89 const std::string& str); 78 const std::string& str);
90 NET_EXPORT_PRIVATE AlternateProtocol AlternateProtocolFromNextProto( 79 NET_EXPORT_PRIVATE AlternateProtocol AlternateProtocolFromNextProto(
91 NextProto next_proto); 80 NextProto next_proto);
92 81
93 // (protocol, host, port) triple as defined in 82 // (protocol, host, port) triple as defined in
94 // https://tools.ietf.org/id/draft-ietf-httpbis-alt-svc-06.html 83 // https://tools.ietf.org/id/draft-ietf-httpbis-alt-svc-06.html
95 struct NET_EXPORT AlternativeService { 84 struct NET_EXPORT AlternativeService {
96 AlternativeService() 85 AlternativeService()
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 virtual void SetMaxServerConfigsStoredInProperties( 359 virtual void SetMaxServerConfigsStoredInProperties(
371 size_t max_server_configs_stored_in_properties) = 0; 360 size_t max_server_configs_stored_in_properties) = 0;
372 361
373 private: 362 private:
374 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); 363 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties);
375 }; 364 };
376 365
377 } // namespace net 366 } // namespace net
378 367
379 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ 368 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_
OLDNEW
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/http/http_server_properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698