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

Unified Diff: net/http/http_server_properties_impl.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
Index: net/http/http_server_properties_impl.h
diff --git a/net/http/http_server_properties_impl.h b/net/http/http_server_properties_impl.h
index 745167582ec956828e6058272c9f4e6b13927da4..624cb7b90c34846beb984494e0219bc7aa41e011 100644
--- a/net/http/http_server_properties_impl.h
+++ b/net/http/http_server_properties_impl.h
@@ -26,6 +26,10 @@
#include "net/http/broken_alternative_services.h"
#include "net/http/http_server_properties.h"
+namespace base {
+class TickClock;
+}
+
namespace net {
// The implementation for setting/retrieving the HTTP server properties.
@@ -33,9 +37,14 @@ class NET_EXPORT HttpServerPropertiesImpl
: public HttpServerProperties,
public BrokenAlternativeServices::Delegate {
public:
+ // |clock| is used for setting expiration times and scheduling the
+ // expiration of broken alternative services. If null, default clock will be
+ // used.
+ explicit HttpServerPropertiesImpl(base::TickClock* clock);
+
+ // Default clock will be used.
HttpServerPropertiesImpl();
- explicit HttpServerPropertiesImpl(
- base::TickClock* broken_alternative_services_clock);
+
~HttpServerPropertiesImpl() override;
// Sets |spdy_servers_map_| with the servers (host/port) from
@@ -58,6 +67,17 @@ class NET_EXPORT HttpServerPropertiesImpl
void GetSpdyServerList(std::vector<std::string>* spdy_servers,
size_t max_size) const;
+ void SetBrokenAndRecentlyBrokenAlternativeServices(
+ std::unique_ptr<BrokenAlternativeServiceList>
+ broken_alternative_service_list,
+ std::unique_ptr<RecentlyBrokenAlternativeServices>
+ recently_broken_alternative_services);
+
+ const BrokenAlternativeServiceList& broken_alternative_service_list() const;
+
+ const RecentlyBrokenAlternativeServices&
+ recently_broken_alternative_services() const;
+
// Returns flattened string representation of the |host_port_pair|. Used by
// unittests.
static std::string GetFlattenedSpdyServer(const HostPortPair& host_port_pair);
@@ -141,14 +161,15 @@ class NET_EXPORT HttpServerPropertiesImpl
// Remove the cononical host for |server|.
void RemoveCanonicalHost(const url::SchemeHostPort& server);
- base::DefaultTickClock broken_alternative_services_clock_;
- BrokenAlternativeServices broken_alternative_services_;
+ base::DefaultTickClock default_clock_;
SpdyServersMap spdy_servers_map_;
Http11ServerHostPortSet http11_servers_;
AlternativeServiceMap alternative_service_map_;
+ BrokenAlternativeServices broken_alternative_services_;
+
IPAddress last_quic_address_;
ServerNetworkStatsMap server_network_stats_map_;
// Contains a map of servers which could share the same alternate protocol.

Powered by Google App Engine
This is Rietveld 408576698