| 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 SetAlternativeService( |
| 131 const AlternativeService& alternative_service, | 131 const url::SchemeHostPort& origin, |
| 132 base::Time expiration) override; | 132 const AlternativeService& alternative_service, |
| 133 base::Time expiration, |
| 134 const QuicVersionVector& advertised_versions) override; |
| 133 bool SetAlternativeServices(const url::SchemeHostPort& origin, | 135 bool SetAlternativeServices(const url::SchemeHostPort& origin, |
| 134 const AlternativeServiceInfoVector& | 136 const AlternativeServiceInfoVector& |
| 135 alternative_service_info_vector) override; | 137 alternative_service_info_vector) override; |
| 136 void MarkAlternativeServiceBroken( | 138 void MarkAlternativeServiceBroken( |
| 137 const AlternativeService& alternative_service) override; | 139 const AlternativeService& alternative_service) override; |
| 138 void MarkAlternativeServiceRecentlyBroken( | 140 void MarkAlternativeServiceRecentlyBroken( |
| 139 const AlternativeService& alternative_service) override; | 141 const AlternativeService& alternative_service) override; |
| 140 bool IsAlternativeServiceBroken( | 142 bool IsAlternativeServiceBroken( |
| 141 const AlternativeService& alternative_service) const override; | 143 const AlternativeService& alternative_service) const override; |
| 142 bool WasAlternativeServiceRecentlyBroken( | 144 bool WasAlternativeServiceRecentlyBroken( |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 ServerNetworkStatsMap* server_network_stats_map, | 240 ServerNetworkStatsMap* server_network_stats_map, |
| 239 QuicServerInfoMap* quic_server_info_map, | 241 QuicServerInfoMap* quic_server_info_map, |
| 240 const base::Closure& completion); | 242 const base::Closure& completion); |
| 241 | 243 |
| 242 private: | 244 private: |
| 243 typedef std::vector<std::string> ServerList; | 245 typedef std::vector<std::string> ServerList; |
| 244 | 246 |
| 245 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, | 247 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, |
| 246 AddToAlternativeServiceMap); | 248 AddToAlternativeServiceMap); |
| 247 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, | 249 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, |
| 250 ReadAdvertisedVersionsFromPref); |
| 251 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, |
| 248 DoNotLoadAltSvcForInsecureOrigins); | 252 DoNotLoadAltSvcForInsecureOrigins); |
| 249 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, | 253 FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, |
| 250 DoNotLoadExpiredAlternativeService); | 254 DoNotLoadExpiredAlternativeService); |
| 251 void OnHttpServerPropertiesChanged(); | 255 void OnHttpServerPropertiesChanged(); |
| 252 | 256 |
| 253 bool AddServersData(const base::DictionaryValue& server_dict, | 257 bool AddServersData(const base::DictionaryValue& server_dict, |
| 254 ServerList* spdy_servers, | 258 ServerList* spdy_servers, |
| 255 AlternativeServiceMap* alternative_service_map, | 259 AlternativeServiceMap* alternative_service_map, |
| 256 ServerNetworkStatsMap* network_stats_map, | 260 ServerNetworkStatsMap* network_stats_map, |
| 257 int version); | 261 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. | 324 // Used to get |weak_ptr_| to self on the network thread. |
| 321 std::unique_ptr<base::WeakPtrFactory<HttpServerPropertiesManager>> | 325 std::unique_ptr<base::WeakPtrFactory<HttpServerPropertiesManager>> |
| 322 network_weak_ptr_factory_; | 326 network_weak_ptr_factory_; |
| 323 | 327 |
| 324 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); | 328 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); |
| 325 }; | 329 }; |
| 326 | 330 |
| 327 } // namespace net | 331 } // namespace net |
| 328 | 332 |
| 329 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 333 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ |
| OLD | NEW |