| OLD | NEW |
| 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 <memory> | 10 #include <memory> |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 bool SupportsRequestPriority(const url::SchemeHostPort& server) override; | 120 bool SupportsRequestPriority(const url::SchemeHostPort& server) override; |
| 121 bool GetSupportsSpdy(const url::SchemeHostPort& server) override; | 121 bool GetSupportsSpdy(const url::SchemeHostPort& server) override; |
| 122 void SetSupportsSpdy(const url::SchemeHostPort& server, | 122 void SetSupportsSpdy(const url::SchemeHostPort& server, |
| 123 bool support_spdy) override; | 123 bool support_spdy) override; |
| 124 bool RequiresHTTP11(const HostPortPair& server) override; | 124 bool RequiresHTTP11(const HostPortPair& server) override; |
| 125 void SetHTTP11Required(const HostPortPair& server) override; | 125 void SetHTTP11Required(const HostPortPair& server) override; |
| 126 void MaybeForceHTTP11(const HostPortPair& server, | 126 void MaybeForceHTTP11(const HostPortPair& server, |
| 127 SSLConfig* ssl_config) override; | 127 SSLConfig* ssl_config) override; |
| 128 AlternativeServiceInfoVector GetAlternativeServiceInfos( | 128 AlternativeServiceInfoVector GetAlternativeServiceInfos( |
| 129 const url::SchemeHostPort& origin) override; | 129 const url::SchemeHostPort& origin) override; |
| 130 bool SetAlternativeService(const url::SchemeHostPort& origin, | 130 bool SetHttp2AlternativeService(const url::SchemeHostPort& origin, |
| 131 const AlternativeService& alternative_service, | 131 const AlternativeService& alternative_service, |
| 132 base::Time expiration) override; | 132 base::Time expiration) override; |
| 133 bool SetQuicAlternativeService( |
| 134 const url::SchemeHostPort& origin, |
| 135 const AlternativeService& alternative_service, |
| 136 base::Time expiration, |
| 137 const QuicVersionVector& advertised_versions) override; |
| 133 bool SetAlternativeServices(const url::SchemeHostPort& origin, | 138 bool SetAlternativeServices(const url::SchemeHostPort& origin, |
| 134 const AlternativeServiceInfoVector& | 139 const AlternativeServiceInfoVector& |
| 135 alternative_service_info_vector) override; | 140 alternative_service_info_vector) override; |
| 136 void MarkAlternativeServiceBroken( | 141 void MarkAlternativeServiceBroken( |
| 137 const AlternativeService& alternative_service) override; | 142 const AlternativeService& alternative_service) override; |
| 138 void MarkAlternativeServiceRecentlyBroken( | 143 void MarkAlternativeServiceRecentlyBroken( |
| 139 const AlternativeService& alternative_service) override; | 144 const AlternativeService& alternative_service) override; |
| 140 bool IsAlternativeServiceBroken( | 145 bool IsAlternativeServiceBroken( |
| 141 const AlternativeService& alternative_service) const override; | 146 const AlternativeService& alternative_service) const override; |
| 142 bool WasAlternativeServiceRecentlyBroken( | 147 bool WasAlternativeServiceRecentlyBroken( |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 ServerNetworkStatsMap* server_network_stats_map, | 243 ServerNetworkStatsMap* server_network_stats_map, |
| 239 QuicServerInfoMap* quic_server_info_map, | 244 QuicServerInfoMap* quic_server_info_map, |
| 240 const base::Closure& completion); | 245 const base::Closure& completion); |
| 241 | 246 |
| 242 private: | 247 private: |
| 243 typedef std::vector<std::string> ServerList; | 248 typedef std::vector<std::string> ServerList; |
| 244 | 249 |
| 245 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, | 250 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, |
| 246 AddToAlternativeServiceMap); | 251 AddToAlternativeServiceMap); |
| 247 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, | 252 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, |
| 253 ReadAdvertisedVersionsFromPref); |
| 254 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, |
| 248 DoNotLoadAltSvcForInsecureOrigins); | 255 DoNotLoadAltSvcForInsecureOrigins); |
| 249 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, | 256 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, |
| 250 DoNotLoadExpiredAlternativeService); | 257 DoNotLoadExpiredAlternativeService); |
| 251 void OnHttpServerPropertiesChanged(); | 258 void OnHttpServerPropertiesChanged(); |
| 252 | 259 |
| 253 bool AddServersData(const base::DictionaryValue& server_dict, | 260 bool AddServersData(const base::DictionaryValue& server_dict, |
| 254 ServerList* spdy_servers, | 261 ServerList* spdy_servers, |
| 255 AlternativeServiceMap* alternative_service_map, | 262 AlternativeServiceMap* alternative_service_map, |
| 256 ServerNetworkStatsMap* network_stats_map, | 263 ServerNetworkStatsMap* network_stats_map, |
| 257 int version); | 264 int version); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 // Used to get |weak_ptr_| to self on the network thread. | 327 // Used to get |weak_ptr_| to self on the network thread. |
| 321 std::unique_ptr<base::WeakPtrFactory<HttpServerPropertiesManager>> | 328 std::unique_ptr<base::WeakPtrFactory<HttpServerPropertiesManager>> |
| 322 network_weak_ptr_factory_; | 329 network_weak_ptr_factory_; |
| 323 | 330 |
| 324 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); | 331 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); |
| 325 }; | 332 }; |
| 326 | 333 |
| 327 } // namespace net | 334 } // namespace net |
| 328 | 335 |
| 329 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 336 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ |
| OLD | NEW |