Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1868)

Side by Side Diff: net/http/http_server_properties.h

Issue 2171743002: Do not persist HttpServerProperties to disk that often. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: #13. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | net/http/http_server_properties_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_server_properties_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698