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

Unified Diff: net/http/broken_alternative_services.h

Issue 2932953002: Persist broken and recently-broken alt-svcs to prefs in HttpServerPropertiesManager (Closed)
Patch Set: Fixed rch's comments from PS14 Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/broken_alternative_services.cc » ('j') | net/http/http_server_properties_manager.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/broken_alternative_services.h
diff --git a/net/http/broken_alternative_services.h b/net/http/broken_alternative_services.h
index cd1ab903c3f650c93a38ec5489f50923028c8361..df1990610cfbbd20dfdb3c6bd3d4b085fc5a2ed9 100644
--- a/net/http/broken_alternative_services.h
+++ b/net/http/broken_alternative_services.h
@@ -84,6 +84,10 @@ class NET_EXPORT_PRIVATE BrokenAlternativeServices {
// expiration time.
// All AlternativeServices in |broken_alternative_service_list| must exist in
// |recently_broken_alternative_services|.
+ //
+ // If a broken/recently-broken alt svc that's being added is already stored,
+ // the stored expiration/broken-count for that alt svc will be overwritten
+ // with the new value.
void SetBrokenAndRecentlyBrokenAlternativeServices(
std::unique_ptr<BrokenAlternativeServiceList>
broken_alternative_service_list,
@@ -100,12 +104,6 @@ class NET_EXPORT_PRIVATE BrokenAlternativeServices {
// friendness is no longer required.
friend class HttpServerPropertiesImplPeer;
- struct AlternativeServiceHash {
- size_t operator()(const net::AlternativeService& entry) const {
- return entry.protocol ^ std::hash<std::string>()(entry.host) ^ entry.port;
- }
- };
-
typedef std::unordered_map<AlternativeService,
BrokenAlternativeServiceList::iterator,
AlternativeServiceHash>
« no previous file with comments | « no previous file | net/http/broken_alternative_services.cc » ('j') | net/http/http_server_properties_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698