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

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

Issue 1824903002: Change the AlternativeServiceMap with SchemeOriginPair key. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_MANAGER_H_ 5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_
6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // Deletes all data. Works asynchronously, but if a |completion| callback is 101 // Deletes all data. Works asynchronously, but if a |completion| callback is
102 // provided, it will be fired on the pref thread when everything is done. 102 // provided, it will be fired on the pref thread when everything is done.
103 void Clear(const base::Closure& completion); 103 void Clear(const base::Closure& completion);
104 104
105 // ---------------------------------- 105 // ----------------------------------
106 // HttpServerProperties methods: 106 // HttpServerProperties methods:
107 // ---------------------------------- 107 // ----------------------------------
108 108
109 base::WeakPtr<HttpServerProperties> GetWeakPtr() override; 109 base::WeakPtr<HttpServerProperties> GetWeakPtr() override;
110 void Clear() override; 110 void Clear() override;
111 bool SupportsRequestPriority(const HostPortPair& server) override; 111 bool SupportsRequestPriority(const url::SchemeHostPort& server) override;
112 bool GetSupportsSpdy(const HostPortPair& server) override; 112 bool GetSupportsSpdy(const HostPortPair& server) override;
113 void SetSupportsSpdy(const HostPortPair& server, bool support_spdy) override; 113 void SetSupportsSpdy(const HostPortPair& server, bool support_spdy) override;
114 bool RequiresHTTP11(const HostPortPair& server) override; 114 bool RequiresHTTP11(const HostPortPair& server) override;
115 void SetHTTP11Required(const HostPortPair& server) override; 115 void SetHTTP11Required(const HostPortPair& server) override;
116 void MaybeForceHTTP11(const HostPortPair& server, 116 void MaybeForceHTTP11(const HostPortPair& server,
117 SSLConfig* ssl_config) override; 117 SSLConfig* ssl_config) override;
118 AlternativeServiceVector GetAlternativeServices( 118 AlternativeServiceVector GetAlternativeServices(
119 const HostPortPair& origin) override; 119 const url::SchemeHostPort& origin) override;
120 bool SetAlternativeService(const HostPortPair& origin, 120 bool SetAlternativeService(const url::SchemeHostPort& origin,
121 const AlternativeService& alternative_service, 121 const AlternativeService& alternative_service,
122 base::Time expiration) override; 122 base::Time expiration) override;
123 bool SetAlternativeServices(const HostPortPair& origin, 123 bool SetAlternativeServices(const url::SchemeHostPort& origin,
124 const AlternativeServiceInfoVector& 124 const AlternativeServiceInfoVector&
125 alternative_service_info_vector) override; 125 alternative_service_info_vector) override;
126 void MarkAlternativeServiceBroken( 126 void MarkAlternativeServiceBroken(
127 const AlternativeService& alternative_service) override; 127 const AlternativeService& alternative_service) override;
128 void MarkAlternativeServiceRecentlyBroken( 128 void MarkAlternativeServiceRecentlyBroken(
129 const AlternativeService& alternative_service) override; 129 const AlternativeService& alternative_service) override;
130 bool IsAlternativeServiceBroken( 130 bool IsAlternativeServiceBroken(
131 const AlternativeService& alternative_service) const override; 131 const AlternativeService& alternative_service) const override;
132 bool WasAlternativeServiceRecentlyBroken( 132 bool WasAlternativeServiceRecentlyBroken(
133 const AlternativeService& alternative_service) override; 133 const AlternativeService& alternative_service) override;
134 void ConfirmAlternativeService( 134 void ConfirmAlternativeService(
135 const AlternativeService& alternative_service) override; 135 const AlternativeService& alternative_service) override;
136 void ClearAlternativeServices(const HostPortPair& origin) override; 136 void ClearAlternativeServices(const url::SchemeHostPort& origin) override;
137 const AlternativeServiceMap& alternative_service_map() const override; 137 const AlternativeServiceMap& alternative_service_map() const override;
138 scoped_ptr<base::Value> GetAlternativeServiceInfoAsValue() const override; 138 scoped_ptr<base::Value> GetAlternativeServiceInfoAsValue() const override;
139 const SettingsMap& GetSpdySettings( 139 const SettingsMap& GetSpdySettings(
140 const HostPortPair& host_port_pair) override; 140 const HostPortPair& host_port_pair) override;
141 bool SetSpdySetting(const HostPortPair& host_port_pair, 141 bool SetSpdySetting(const HostPortPair& host_port_pair,
142 SpdySettingsIds id, 142 SpdySettingsIds id,
143 SpdySettingsFlags flags, 143 SpdySettingsFlags flags,
144 uint32_t value) override; 144 uint32_t value) override;
145 void ClearSpdySettings(const HostPortPair& host_port_pair) override; 145 void ClearSpdySettings(const HostPortPair& host_port_pair) override;
146 void ClearAllSpdySettings() override; 146 void ClearAllSpdySettings() override;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, 246 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest,
247 AddToAlternativeServiceMap); 247 AddToAlternativeServiceMap);
248 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, 248 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest,
249 DoNotLoadExpiredAlternativeService); 249 DoNotLoadExpiredAlternativeService);
250 void OnHttpServerPropertiesChanged(); 250 void OnHttpServerPropertiesChanged();
251 251
252 bool AddServersData(const base::DictionaryValue& server_dict, 252 bool AddServersData(const base::DictionaryValue& server_dict,
253 ServerList* spdy_servers, 253 ServerList* spdy_servers,
254 SpdySettingsMap* spdy_settings_map, 254 SpdySettingsMap* spdy_settings_map,
255 AlternativeServiceMap* alternative_service_map, 255 AlternativeServiceMap* alternative_service_map,
256 ServerNetworkStatsMap* network_stats_map); 256 ServerNetworkStatsMap* network_stats_map,
257 int version);
257 void AddToSpdySettingsMap(const HostPortPair& server, 258 void AddToSpdySettingsMap(const HostPortPair& server,
258 const base::DictionaryValue& server_dict, 259 const base::DictionaryValue& server_dict,
259 SpdySettingsMap* spdy_settings_map); 260 SpdySettingsMap* spdy_settings_map);
260 bool ParseAlternativeServiceDict( 261 bool ParseAlternativeServiceDict(
261 const base::DictionaryValue& alternative_service_dict, 262 const base::DictionaryValue& alternative_service_dict,
262 const std::string& server_str, 263 const std::string& server_str,
263 AlternativeServiceInfo* alternative_service_info); 264 AlternativeServiceInfo* alternative_service_info);
264 bool AddToAlternativeServiceMap( 265 bool AddToAlternativeServiceMap(
265 const HostPortPair& server, 266 const url::SchemeHostPort& server,
266 const base::DictionaryValue& server_dict, 267 const base::DictionaryValue& server_dict,
267 AlternativeServiceMap* alternative_service_map); 268 AlternativeServiceMap* alternative_service_map);
268 bool ReadSupportsQuic(const base::DictionaryValue& server_dict, 269 bool ReadSupportsQuic(const base::DictionaryValue& server_dict,
269 IPAddress* last_quic_address); 270 IPAddress* last_quic_address);
270 bool AddToNetworkStatsMap(const HostPortPair& server, 271 bool AddToNetworkStatsMap(const HostPortPair& server,
271 const base::DictionaryValue& server_dict, 272 const base::DictionaryValue& server_dict,
272 ServerNetworkStatsMap* network_stats_map); 273 ServerNetworkStatsMap* network_stats_map);
273 bool AddToQuicServerInfoMap(const base::DictionaryValue& server_dict, 274 bool AddToQuicServerInfoMap(const base::DictionaryValue& server_dict,
274 QuicServerInfoMap* quic_server_info_map); 275 QuicServerInfoMap* quic_server_info_map);
275 276
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // Used to get |weak_ptr_| to self on the network thread. 321 // Used to get |weak_ptr_| to self on the network thread.
321 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> > 322 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> >
322 network_weak_ptr_factory_; 323 network_weak_ptr_factory_;
323 324
324 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); 325 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager);
325 }; 326 };
326 327
327 } // namespace net 328 } // namespace net
328 329
329 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ 330 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_
OLDNEW
« no previous file with comments | « net/http/http_server_properties_impl_unittest.cc ('k') | net/http/http_server_properties_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698