| 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 <string> | 10 #include <string> |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 SchemeOriginPair& 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 SchemeOriginPair& origin) override; |
| 120 bool SetAlternativeService(const HostPortPair& origin, | 120 bool SetAlternativeService(const SchemeOriginPair& origin, |
| 121 const AlternativeService& alternative_service, | 121 const AlternativeService& alternative_service, |
| 122 double alternative_probability, | 122 double alternative_probability, |
| 123 base::Time expiration) override; | 123 base::Time expiration) override; |
| 124 bool SetAlternativeServices(const HostPortPair& origin, | 124 bool SetAlternativeServices(const SchemeOriginPair& origin, |
| 125 const AlternativeServiceInfoVector& | 125 const AlternativeServiceInfoVector& |
| 126 alternative_service_info_vector) override; | 126 alternative_service_info_vector) override; |
| 127 void MarkAlternativeServiceBroken( | 127 void MarkAlternativeServiceBroken( |
| 128 const AlternativeService& alternative_service) override; | 128 const AlternativeService& alternative_service) override; |
| 129 void MarkAlternativeServiceRecentlyBroken( | 129 void MarkAlternativeServiceRecentlyBroken( |
| 130 const AlternativeService& alternative_service) override; | 130 const AlternativeService& alternative_service) override; |
| 131 bool IsAlternativeServiceBroken( | 131 bool IsAlternativeServiceBroken( |
| 132 const AlternativeService& alternative_service) const override; | 132 const AlternativeService& alternative_service) const override; |
| 133 bool WasAlternativeServiceRecentlyBroken( | 133 bool WasAlternativeServiceRecentlyBroken( |
| 134 const AlternativeService& alternative_service) override; | 134 const AlternativeService& alternative_service) override; |
| 135 void ConfirmAlternativeService( | 135 void ConfirmAlternativeService( |
| 136 const AlternativeService& alternative_service) override; | 136 const AlternativeService& alternative_service) override; |
| 137 void ClearAlternativeServices(const HostPortPair& origin) override; | 137 void ClearAlternativeServices(const SchemeOriginPair& origin) override; |
| 138 const AlternativeServiceMap& alternative_service_map() const override; | 138 const AlternativeServiceMap& alternative_service_map() const override; |
| 139 scoped_ptr<base::Value> GetAlternativeServiceInfoAsValue() const override; | 139 scoped_ptr<base::Value> GetAlternativeServiceInfoAsValue() const override; |
| 140 void SetAlternativeServiceProbabilityThreshold(double threshold) override; | 140 void SetAlternativeServiceProbabilityThreshold(double threshold) override; |
| 141 const SettingsMap& GetSpdySettings( | 141 const SettingsMap& GetSpdySettings( |
| 142 const HostPortPair& host_port_pair) override; | 142 const HostPortPair& host_port_pair) override; |
| 143 bool SetSpdySetting(const HostPortPair& host_port_pair, | 143 bool SetSpdySetting(const HostPortPair& host_port_pair, |
| 144 SpdySettingsIds id, | 144 SpdySettingsIds id, |
| 145 SpdySettingsFlags flags, | 145 SpdySettingsFlags flags, |
| 146 uint32_t value) override; | 146 uint32_t value) override; |
| 147 void ClearSpdySettings(const HostPortPair& host_port_pair) override; | 147 void ClearSpdySettings(const HostPortPair& host_port_pair) override; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 AlternativeServiceMap* alternative_service_map, | 257 AlternativeServiceMap* alternative_service_map, |
| 258 ServerNetworkStatsMap* network_stats_map); | 258 ServerNetworkStatsMap* network_stats_map); |
| 259 void AddToSpdySettingsMap(const HostPortPair& server, | 259 void AddToSpdySettingsMap(const HostPortPair& server, |
| 260 const base::DictionaryValue& server_dict, | 260 const base::DictionaryValue& server_dict, |
| 261 SpdySettingsMap* spdy_settings_map); | 261 SpdySettingsMap* spdy_settings_map); |
| 262 bool ParseAlternativeServiceDict( | 262 bool ParseAlternativeServiceDict( |
| 263 const base::DictionaryValue& alternative_service_dict, | 263 const base::DictionaryValue& alternative_service_dict, |
| 264 const std::string& server_str, | 264 const std::string& server_str, |
| 265 AlternativeServiceInfo* alternative_service_info); | 265 AlternativeServiceInfo* alternative_service_info); |
| 266 bool AddToAlternativeServiceMap( | 266 bool AddToAlternativeServiceMap( |
| 267 const HostPortPair& server, | 267 const SchemeOriginPair& server, |
| 268 const base::DictionaryValue& server_dict, | 268 const base::DictionaryValue& server_dict, |
| 269 AlternativeServiceMap* alternative_service_map); | 269 AlternativeServiceMap* alternative_service_map); |
| 270 bool ReadSupportsQuic(const base::DictionaryValue& server_dict, | 270 bool ReadSupportsQuic(const base::DictionaryValue& server_dict, |
| 271 IPAddress* last_quic_address); | 271 IPAddress* last_quic_address); |
| 272 bool AddToNetworkStatsMap(const HostPortPair& server, | 272 bool AddToNetworkStatsMap(const HostPortPair& server, |
| 273 const base::DictionaryValue& server_dict, | 273 const base::DictionaryValue& server_dict, |
| 274 ServerNetworkStatsMap* network_stats_map); | 274 ServerNetworkStatsMap* network_stats_map); |
| 275 bool AddToQuicServerInfoMap(const base::DictionaryValue& server_dict, | 275 bool AddToQuicServerInfoMap(const base::DictionaryValue& server_dict, |
| 276 QuicServerInfoMap* quic_server_info_map); | 276 QuicServerInfoMap* quic_server_info_map); |
| 277 | 277 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 // Used to get |weak_ptr_| to self on the network thread. | 322 // Used to get |weak_ptr_| to self on the network thread. |
| 323 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> > | 323 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> > |
| 324 network_weak_ptr_factory_; | 324 network_weak_ptr_factory_; |
| 325 | 325 |
| 326 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); | 326 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); |
| 327 }; | 327 }; |
| 328 | 328 |
| 329 } // namespace net | 329 } // namespace net |
| 330 | 330 |
| 331 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 331 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ |
| OLD | NEW |