OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 virtual void ConfirmAlternativeService( | 264 virtual void ConfirmAlternativeService( |
265 const AlternativeService& alternative_service) = 0; | 265 const AlternativeService& alternative_service) = 0; |
266 | 266 |
267 // Clears the alternative service for |origin|. | 267 // Clears the alternative service for |origin|. |
268 virtual void ClearAlternativeService(const HostPortPair& origin) = 0; | 268 virtual void ClearAlternativeService(const HostPortPair& origin) = 0; |
269 | 269 |
270 // Returns all alternative service mappings. | 270 // Returns all alternative service mappings. |
271 virtual const AlternativeServiceMap& alternative_service_map() const = 0; | 271 virtual const AlternativeServiceMap& alternative_service_map() const = 0; |
272 | 272 |
273 // Returns all alternative service mappings as human readable strings. | 273 // Returns all alternative service mappings as human readable strings. |
274 virtual base::Value* GetAlternativeServiceInfoAsValue() const = 0; | 274 virtual scoped_ptr<base::Value> GetAlternativeServiceInfoAsValue() const = 0; |
275 | 275 |
276 // Sets the threshold to be used when evaluating alternative service | 276 // Sets the threshold to be used when evaluating alternative service |
277 // advertisments. Only advertisements with a probability greater than or equal | 277 // advertisments. Only advertisements with a probability greater than or equal |
278 // to |threshold| will be honored. |threshold| must be between 0.0 and 1.0 | 278 // to |threshold| will be honored. |threshold| must be between 0.0 and 1.0 |
279 // inclusive. Hence, a threshold of 0.0 implies that all advertisements will | 279 // inclusive. Hence, a threshold of 0.0 implies that all advertisements will |
280 // be honored. | 280 // be honored. |
281 virtual void SetAlternativeServiceProbabilityThreshold(double threshold) = 0; | 281 virtual void SetAlternativeServiceProbabilityThreshold(double threshold) = 0; |
282 | 282 |
283 // Gets a reference to the SettingsMap stored for a host. | 283 // Gets a reference to the SettingsMap stored for a host. |
284 // If no settings are stored, returns an empty SettingsMap. | 284 // If no settings are stored, returns an empty SettingsMap. |
(...skipping 29 matching lines...) Expand all Loading... |
314 | 314 |
315 virtual const ServerNetworkStatsMap& server_network_stats_map() const = 0; | 315 virtual const ServerNetworkStatsMap& server_network_stats_map() const = 0; |
316 | 316 |
317 private: | 317 private: |
318 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 318 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
319 }; | 319 }; |
320 | 320 |
321 } // namespace net | 321 } // namespace net |
322 | 322 |
323 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 323 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
OLD | NEW |