| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 SSLConfig* ssl_config) = 0; | 258 SSLConfig* ssl_config) = 0; |
| 259 | 259 |
| 260 // Return all alternative services for |origin|, including broken ones. | 260 // Return all alternative services for |origin|, including broken ones. |
| 261 // Returned alternative services never have empty hostnames. | 261 // Returned alternative services never have empty hostnames. |
| 262 virtual AlternativeServiceVector GetAlternativeServices( | 262 virtual AlternativeServiceVector GetAlternativeServices( |
| 263 const url::SchemeHostPort& origin) = 0; | 263 const url::SchemeHostPort& origin) = 0; |
| 264 | 264 |
| 265 // Set a single alternative service for |origin|. Previous alternative | 265 // Set a single alternative service for |origin|. Previous alternative |
| 266 // services for |origin| are discarded. | 266 // services for |origin| are discarded. |
| 267 // |alternative_service.host| may be empty. | 267 // |alternative_service.host| may be empty. |
| 268 // Return true if |alternative_service_map_| is changed. | 268 // Return true if |alternative_service_map_| has changed significantly enough |
| 269 // that it should be persisted to disk. |
| 269 virtual bool SetAlternativeService( | 270 virtual bool SetAlternativeService( |
| 270 const url::SchemeHostPort& origin, | 271 const url::SchemeHostPort& origin, |
| 271 const AlternativeService& alternative_service, | 272 const AlternativeService& alternative_service, |
| 272 base::Time expiration) = 0; | 273 base::Time expiration) = 0; |
| 273 | 274 |
| 274 // Set alternative services for |origin|. Previous alternative services for | 275 // Set alternative services for |origin|. Previous alternative services for |
| 275 // |origin| are discarded. | 276 // |origin| are discarded. |
| 276 // Hostnames in |alternative_service_info_vector| may be empty. | 277 // Hostnames in |alternative_service_info_vector| may be empty. |
| 277 // Return true if |alternative_service_map_| is changed. | 278 // |alternative_service_info_vector| may be empty. |
| 279 // Return true if |alternative_service_map_| has changed significantly enough |
| 280 // that it should be persisted to disk. |
| 278 virtual bool SetAlternativeServices( | 281 virtual bool SetAlternativeServices( |
| 279 const url::SchemeHostPort& origin, | 282 const url::SchemeHostPort& origin, |
| 280 const AlternativeServiceInfoVector& alternative_service_info_vector) = 0; | 283 const AlternativeServiceInfoVector& alternative_service_info_vector) = 0; |
| 281 | 284 |
| 282 // Marks |alternative_service| as broken. | 285 // Marks |alternative_service| as broken. |
| 283 // |alternative_service.host| must not be empty. | 286 // |alternative_service.host| must not be empty. |
| 284 virtual void MarkAlternativeServiceBroken( | 287 virtual void MarkAlternativeServiceBroken( |
| 285 const AlternativeService& alternative_service) = 0; | 288 const AlternativeService& alternative_service) = 0; |
| 286 | 289 |
| 287 // Marks |alternative_service| as recently broken. | 290 // Marks |alternative_service| as recently broken. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 virtual void SetMaxServerConfigsStoredInProperties( | 370 virtual void SetMaxServerConfigsStoredInProperties( |
| 368 size_t max_server_configs_stored_in_properties) = 0; | 371 size_t max_server_configs_stored_in_properties) = 0; |
| 369 | 372 |
| 370 private: | 373 private: |
| 371 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 374 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
| 372 }; | 375 }; |
| 373 | 376 |
| 374 } // namespace net | 377 } // namespace net |
| 375 | 378 |
| 376 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 379 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| OLD | NEW |