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

Unified Diff: net/http/http_server_properties_manager.cc

Issue 1520053002: QUIC - Small bug fixes. Persist MRU kMaxServerNetworkStatsHostsToPersist (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties_manager.cc
diff --git a/net/http/http_server_properties_manager.cc b/net/http/http_server_properties_manager.cc
index 66b440148827a22df888fa4ef124a2ce41006efa..f26b394581e53a8ac11947eea65d275c02576feb 100644
--- a/net/http/http_server_properties_manager.cc
+++ b/net/http/http_server_properties_manager.cc
@@ -890,8 +890,6 @@ void HttpServerPropertiesManager::UpdatePrefsFromCacheOnNetworkThread(
if (notbroken_alternative_service_info_vector.empty()) {
continue;
}
- alternative_service_map->Put(server,
- notbroken_alternative_service_info_vector);
std::string canonical_suffix =
http_server_properties_impl_->GetCanonicalSuffix(server.host());
if (!canonical_suffix.empty()) {
@@ -899,16 +897,20 @@ void HttpServerPropertiesManager::UpdatePrefsFromCacheOnNetworkThread(
continue;
persisted_map[canonical_suffix] = true;
}
+ alternative_service_map->Put(server,
+ notbroken_alternative_service_info_vector);
++count;
}
ServerNetworkStatsMap* server_network_stats_map =
new ServerNetworkStatsMap(kMaxServerNetworkStatsHostsToPersist);
- const ServerNetworkStatsMap& main_server_network_stats_map =
+ const ServerNetworkStatsMap& network_stats_map =
http_server_properties_impl_->server_network_stats_map();
- for (ServerNetworkStatsMap::const_iterator it =
- main_server_network_stats_map.begin();
- it != main_server_network_stats_map.end(); ++it) {
+ count = 0;
+ for (ServerNetworkStatsMap::const_iterator it = network_stats_map.begin();
+ it != network_stats_map.end() &&
+ count < kMaxServerNetworkStatsHostsToPersist;
+ ++it, ++count) {
server_network_stats_map->Put(it->first, it->second);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698