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

Unified Diff: net/http/http_server_properties_impl.cc

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.cc
diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc
index b96a4b27d707291d89ce5a9629f96cf4b447cb48..b9acdbc740093c24c043f45e4843c9d17de49ac2 100644
--- a/net/http/http_server_properties_impl.cc
+++ b/net/http/http_server_properties_impl.cc
@@ -20,17 +20,10 @@
namespace net {
-HttpServerPropertiesImpl::HttpServerPropertiesImpl()
- : HttpServerPropertiesImpl(nullptr) {}
-
-HttpServerPropertiesImpl::HttpServerPropertiesImpl(
- base::TickClock* broken_alternative_services_clock)
- : broken_alternative_services_(this,
- broken_alternative_services_clock
- ? broken_alternative_services_clock
- : &broken_alternative_services_clock_),
- spdy_servers_map_(SpdyServersMap::NO_AUTO_EVICT),
+HttpServerPropertiesImpl::HttpServerPropertiesImpl(base::TickClock* clock)
+ : spdy_servers_map_(SpdyServersMap::NO_AUTO_EVICT),
alternative_service_map_(AlternativeServiceMap::NO_AUTO_EVICT),
+ broken_alternative_services_(this, clock ? clock : &default_clock_),
server_network_stats_map_(ServerNetworkStatsMap::NO_AUTO_EVICT),
quic_server_info_map_(QuicServerInfoMap::NO_AUTO_EVICT),
max_server_configs_stored_in_properties_(kMaxQuicServersToPersist) {
@@ -40,6 +33,9 @@ HttpServerPropertiesImpl::HttpServerPropertiesImpl(
canonical_suffixes_.push_back(".googleusercontent.com");
}
+HttpServerPropertiesImpl::HttpServerPropertiesImpl()
+ : HttpServerPropertiesImpl(nullptr) {}
+
HttpServerPropertiesImpl::~HttpServerPropertiesImpl() {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
}
@@ -165,6 +161,26 @@ void HttpServerPropertiesImpl::GetSpdyServerList(
}
}
+void HttpServerPropertiesImpl::SetBrokenAndRecentlyBrokenAlternativeServices(
+ std::unique_ptr<BrokenAlternativeServiceList>
+ broken_alternative_service_list,
+ std::unique_ptr<RecentlyBrokenAlternativeServices>
+ recently_broken_alternative_services) {
+ broken_alternative_services_.SetBrokenAndRecentlyBrokenAlternativeServices(
+ std::move(broken_alternative_service_list),
+ std::move(recently_broken_alternative_services));
+}
+
+const BrokenAlternativeServiceList&
+HttpServerPropertiesImpl::broken_alternative_service_list() const {
+ return broken_alternative_services_.broken_alternative_service_list();
+}
+
+const RecentlyBrokenAlternativeServices&
+HttpServerPropertiesImpl::recently_broken_alternative_services() const {
+ return broken_alternative_services_.recently_broken_alternative_services();
+}
+
void HttpServerPropertiesImpl::Clear() {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
spdy_servers_map_.Clear();

Powered by Google App Engine
This is Rietveld 408576698