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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 const AlternativeService& alternative_service) override; | 143 const AlternativeService& alternative_service) override; |
144 void ConfirmAlternativeService( | 144 void ConfirmAlternativeService( |
145 const AlternativeService& alternative_service) override; | 145 const AlternativeService& alternative_service) override; |
146 const AlternativeServiceMap& alternative_service_map() const override; | 146 const AlternativeServiceMap& alternative_service_map() const override; |
147 std::unique_ptr<base::Value> GetAlternativeServiceInfoAsValue() | 147 std::unique_ptr<base::Value> GetAlternativeServiceInfoAsValue() |
148 const override; | 148 const override; |
149 bool GetSupportsQuic(IPAddress* last_address) const override; | 149 bool GetSupportsQuic(IPAddress* last_address) const override; |
150 void SetSupportsQuic(bool used_quic, const IPAddress& last_address) override; | 150 void SetSupportsQuic(bool used_quic, const IPAddress& last_address) override; |
151 void SetServerNetworkStats(const url::SchemeHostPort& server, | 151 void SetServerNetworkStats(const url::SchemeHostPort& server, |
152 ServerNetworkStats stats) override; | 152 ServerNetworkStats stats) override; |
| 153 void ClearServerNetworkStats(const url::SchemeHostPort& server) override; |
153 const ServerNetworkStats* GetServerNetworkStats( | 154 const ServerNetworkStats* GetServerNetworkStats( |
154 const url::SchemeHostPort& server) override; | 155 const url::SchemeHostPort& server) override; |
155 const ServerNetworkStatsMap& server_network_stats_map() const override; | 156 const ServerNetworkStatsMap& server_network_stats_map() const override; |
156 bool SetQuicServerInfo(const QuicServerId& server_id, | 157 bool SetQuicServerInfo(const QuicServerId& server_id, |
157 const std::string& server_info) override; | 158 const std::string& server_info) override; |
158 const std::string* GetQuicServerInfo(const QuicServerId& server_id) override; | 159 const std::string* GetQuicServerInfo(const QuicServerId& server_id) override; |
159 const QuicServerInfoMap& quic_server_info_map() const override; | 160 const QuicServerInfoMap& quic_server_info_map() const override; |
160 size_t max_server_configs_stored_in_properties() const override; | 161 size_t max_server_configs_stored_in_properties() const override; |
161 void SetMaxServerConfigsStoredInProperties( | 162 void SetMaxServerConfigsStoredInProperties( |
162 size_t max_server_configs_stored_in_properties) override; | 163 size_t max_server_configs_stored_in_properties) override; |
163 bool IsInitialized() const override; | 164 bool IsInitialized() const override; |
164 | 165 |
165 protected: | 166 protected: |
166 // The location where ScheduleUpdatePrefsOnNetworkThread was called. | 167 // The location where ScheduleUpdatePrefsOnNetworkThread was called. |
| 168 // Must be kept up to date with HttpServerPropertiesUpdatePrefsLocation in |
| 169 // histograms.xml. |
167 enum Location { | 170 enum Location { |
168 SUPPORTS_SPDY = 0, | 171 SUPPORTS_SPDY = 0, |
169 HTTP_11_REQUIRED = 1, | 172 HTTP_11_REQUIRED = 1, |
170 SET_ALTERNATIVE_SERVICES = 2, | 173 SET_ALTERNATIVE_SERVICES = 2, |
171 MARK_ALTERNATIVE_SERVICE_BROKEN = 3, | 174 MARK_ALTERNATIVE_SERVICE_BROKEN = 3, |
172 MARK_ALTERNATIVE_SERVICE_RECENTLY_BROKEN = 4, | 175 MARK_ALTERNATIVE_SERVICE_RECENTLY_BROKEN = 4, |
173 CONFIRM_ALTERNATIVE_SERVICE = 5, | 176 CONFIRM_ALTERNATIVE_SERVICE = 5, |
174 CLEAR_ALTERNATIVE_SERVICE = 6, | 177 CLEAR_ALTERNATIVE_SERVICE = 6, |
175 // deprecated: SET_SPDY_SETTING = 7, | 178 // deprecated: SET_SPDY_SETTING = 7, |
176 // deprecated: CLEAR_SPDY_SETTINGS = 8, | 179 // deprecated: CLEAR_SPDY_SETTINGS = 8, |
177 // deprecated: CLEAR_ALL_SPDY_SETTINGS = 9, | 180 // deprecated: CLEAR_ALL_SPDY_SETTINGS = 9, |
178 SET_SUPPORTS_QUIC = 10, | 181 SET_SUPPORTS_QUIC = 10, |
179 SET_SERVER_NETWORK_STATS = 11, | 182 SET_SERVER_NETWORK_STATS = 11, |
180 DETECTED_CORRUPTED_PREFS = 12, | 183 DETECTED_CORRUPTED_PREFS = 12, |
181 SET_QUIC_SERVER_INFO = 13, | 184 SET_QUIC_SERVER_INFO = 13, |
182 NUM_LOCATIONS = 14, | 185 CLEAR_SERVER_NETWORK_STATS = 14, |
| 186 NUM_LOCATIONS = 15, |
183 }; | 187 }; |
184 | 188 |
185 // -------------------- | 189 // -------------------- |
186 // SPDY related methods | 190 // SPDY related methods |
187 | 191 |
188 // These are used to delay updating of the cached data in | 192 // These are used to delay updating of the cached data in |
189 // |http_server_properties_impl_| while the preferences are changing, and | 193 // |http_server_properties_impl_| while the preferences are changing, and |
190 // execute only one update per simultaneous prefs changes. | 194 // execute only one update per simultaneous prefs changes. |
191 void ScheduleUpdateCacheOnPrefThread(); | 195 void ScheduleUpdateCacheOnPrefThread(); |
192 | 196 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 // Used to get |weak_ptr_| to self on the network thread. | 317 // Used to get |weak_ptr_| to self on the network thread. |
314 std::unique_ptr<base::WeakPtrFactory<HttpServerPropertiesManager>> | 318 std::unique_ptr<base::WeakPtrFactory<HttpServerPropertiesManager>> |
315 network_weak_ptr_factory_; | 319 network_weak_ptr_factory_; |
316 | 320 |
317 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); | 321 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); |
318 }; | 322 }; |
319 | 323 |
320 } // namespace net | 324 } // namespace net |
321 | 325 |
322 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 326 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ |
OLD | NEW |