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. |