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

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

Issue 892203004: Make HttpServerProperties::GetSupportsQuic not host-specific. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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_IMPL_H_ 5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_
6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_ 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 25 matching lines...) Expand all
36 // Initializes |spdy_servers_map_| with the servers (host/port) from 36 // Initializes |spdy_servers_map_| with the servers (host/port) from
37 // |spdy_servers| that either support SPDY or not. 37 // |spdy_servers| that either support SPDY or not.
38 void InitializeSpdyServers(std::vector<std::string>* spdy_servers, 38 void InitializeSpdyServers(std::vector<std::string>* spdy_servers,
39 bool support_spdy); 39 bool support_spdy);
40 40
41 void InitializeAlternateProtocolServers( 41 void InitializeAlternateProtocolServers(
42 AlternateProtocolMap* alternate_protocol_servers); 42 AlternateProtocolMap* alternate_protocol_servers);
43 43
44 void InitializeSpdySettingsServers(SpdySettingsMap* spdy_settings_map); 44 void InitializeSpdySettingsServers(SpdySettingsMap* spdy_settings_map);
45 45
46 void InitializeSupportsQuic(SupportsQuicMap* supports_quic_map); 46 void InitializeSupportsQuic(IPAddressNumber* last_address);
47 47
48 void InitializeServerNetworkStats( 48 void InitializeServerNetworkStats(
49 ServerNetworkStatsMap* server_network_stats_map); 49 ServerNetworkStatsMap* server_network_stats_map);
50 50
51 // Get the list of servers (host/port) that support SPDY. The max_size is the 51 // Get the list of servers (host/port) that support SPDY. The max_size is the
52 // number of MRU servers that support SPDY that are to be returned. 52 // number of MRU servers that support SPDY that are to be returned.
53 void GetSpdyServerList(base::ListValue* spdy_server_list, 53 void GetSpdyServerList(base::ListValue* spdy_server_list,
54 size_t max_size) const; 54 size_t max_size) const;
55 55
56 // Returns flattened string representation of the |host_port_pair|. Used by 56 // Returns flattened string representation of the |host_port_pair|. Used by
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void SetAlternateProtocolProbabilityThreshold(double threshold) override; 94 void SetAlternateProtocolProbabilityThreshold(double threshold) override;
95 const SettingsMap& GetSpdySettings( 95 const SettingsMap& GetSpdySettings(
96 const HostPortPair& host_port_pair) override; 96 const HostPortPair& host_port_pair) override;
97 bool SetSpdySetting(const HostPortPair& host_port_pair, 97 bool SetSpdySetting(const HostPortPair& host_port_pair,
98 SpdySettingsIds id, 98 SpdySettingsIds id,
99 SpdySettingsFlags flags, 99 SpdySettingsFlags flags,
100 uint32 value) override; 100 uint32 value) override;
101 void ClearSpdySettings(const HostPortPair& host_port_pair) override; 101 void ClearSpdySettings(const HostPortPair& host_port_pair) override;
102 void ClearAllSpdySettings() override; 102 void ClearAllSpdySettings() override;
103 const SpdySettingsMap& spdy_settings_map() const override; 103 const SpdySettingsMap& spdy_settings_map() const override;
104 SupportsQuic GetSupportsQuic( 104 bool GetSupportsQuic(IPAddressNumber* last_address) const override;
105 const HostPortPair& host_port_pair) const override; 105 void SetSupportsQuic(bool used_quic, const IPAddressNumber& address) override;
106 void SetSupportsQuic(const HostPortPair& host_port_pair,
107 bool used_quic,
108 const std::string& address) override;
109 const SupportsQuicMap& supports_quic_map() const override;
110 void SetServerNetworkStats(const HostPortPair& host_port_pair, 106 void SetServerNetworkStats(const HostPortPair& host_port_pair,
111 ServerNetworkStats stats) override; 107 ServerNetworkStats stats) override;
112 const ServerNetworkStats* GetServerNetworkStats( 108 const ServerNetworkStats* GetServerNetworkStats(
113 const HostPortPair& host_port_pair) override; 109 const HostPortPair& host_port_pair) override;
114 const ServerNetworkStatsMap& server_network_stats_map() const override; 110 const ServerNetworkStatsMap& server_network_stats_map() const override;
115 111
116 private: 112 private:
117 // |spdy_servers_map_| has flattened representation of servers (host, port) 113 // |spdy_servers_map_| has flattened representation of servers (host, port)
118 // that either support or not support SPDY protocol. 114 // that either support or not support SPDY protocol.
119 typedef base::MRUCache<std::string, bool> SpdyServerHostPortMap; 115 typedef base::MRUCache<std::string, bool> SpdyServerHostPortMap;
(...skipping 22 matching lines...) Expand all
142 void ExpireBrokenAlternateProtocolMappings(); 138 void ExpireBrokenAlternateProtocolMappings();
143 void ScheduleBrokenAlternateProtocolMappingsExpiration(); 139 void ScheduleBrokenAlternateProtocolMappingsExpiration();
144 140
145 SpdyServerHostPortMap spdy_servers_map_; 141 SpdyServerHostPortMap spdy_servers_map_;
146 Http11ServerHostPortSet http11_servers_; 142 Http11ServerHostPortSet http11_servers_;
147 143
148 AlternateProtocolMap alternate_protocol_map_; 144 AlternateProtocolMap alternate_protocol_map_;
149 BrokenAlternateProtocolList broken_alternate_protocol_list_; 145 BrokenAlternateProtocolList broken_alternate_protocol_list_;
150 BrokenAlternateProtocolMap broken_alternate_protocol_map_; 146 BrokenAlternateProtocolMap broken_alternate_protocol_map_;
151 147
148 IPAddressNumber last_quic_address_;
152 SpdySettingsMap spdy_settings_map_; 149 SpdySettingsMap spdy_settings_map_;
153 SupportsQuicMap supports_quic_map_;
154 ServerNetworkStatsMap server_network_stats_map_; 150 ServerNetworkStatsMap server_network_stats_map_;
155 // Contains a map of servers which could share the same alternate protocol. 151 // Contains a map of servers which could share the same alternate protocol.
156 // Map from a Canonical host/port (host is some postfix of host names) to an 152 // Map from a Canonical host/port (host is some postfix of host names) to an
157 // actual origin, which has a plausible alternate protocol mapping. 153 // actual origin, which has a plausible alternate protocol mapping.
158 CanonicalHostMap canonical_host_to_origin_map_; 154 CanonicalHostMap canonical_host_to_origin_map_;
159 // Contains list of suffixes (for exmaple ".c.youtube.com", 155 // Contains list of suffixes (for exmaple ".c.youtube.com",
160 // ".googlevideo.com", ".googleusercontent.com") of canonical hostnames. 156 // ".googlevideo.com", ".googleusercontent.com") of canonical hostnames.
161 CanonicalSufficList canonical_suffixes_; 157 CanonicalSufficList canonical_suffixes_;
162 158
163 double alternate_protocol_probability_threshold_; 159 double alternate_protocol_probability_threshold_;
164 160
165 base::WeakPtrFactory<HttpServerPropertiesImpl> weak_ptr_factory_; 161 base::WeakPtrFactory<HttpServerPropertiesImpl> weak_ptr_factory_;
166 162
167 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesImpl); 163 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesImpl);
168 }; 164 };
169 165
170 } // namespace net 166 } // namespace net
171 167
172 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_ 168 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698