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

Unified Diff: net/http/http_server_properties_manager.cc

Issue 1572753003: QUIC - Allow cronet apps to specify how many server configs are to be (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments in Patch set 4 Created 4 years, 11 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 | « net/http/http_server_properties_manager.h ('k') | net/http/http_server_properties_manager_unittest.cc » ('j') | 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 70dc3e8577185f6b36886106709e8c2e733198c6..f7493ff06523fda8262903eae7b6145c15bfc5e1 100644
--- a/net/http/http_server_properties_manager.cc
+++ b/net/http/http_server_properties_manager.cc
@@ -406,6 +406,20 @@ const QuicServerInfoMap& HttpServerPropertiesManager::quic_server_info_map()
return http_server_properties_impl_->quic_server_info_map();
}
+size_t HttpServerPropertiesManager::max_server_configs_stored_in_properties()
+ const {
+ DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
+ return http_server_properties_impl_
+ ->max_server_configs_stored_in_properties();
+}
+
+void HttpServerPropertiesManager::SetMaxServerConfigsStoredInProperties(
+ size_t max_server_configs_stored_in_properties) {
+ DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
+ return http_server_properties_impl_->SetMaxServerConfigsStoredInProperties(
+ max_server_configs_stored_in_properties);
+}
+
//
// Update the HttpServerPropertiesImpl's cache with data from preferences.
//
@@ -497,7 +511,7 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnPrefThread() {
scoped_ptr<ServerNetworkStatsMap> server_network_stats_map(
new ServerNetworkStatsMap(kMaxServerNetworkStatsHostsToPersist));
scoped_ptr<QuicServerInfoMap> quic_server_info_map(
- new QuicServerInfoMap(kMaxQuicServersToPersist));
+ new QuicServerInfoMap(QuicServerInfoMap::NO_AUTO_EVICT));
if (version < 4) {
if (!AddServersData(*servers_dict, spdy_servers.get(),
@@ -980,7 +994,8 @@ void HttpServerPropertiesManager::UpdatePrefsFromCacheOnNetworkThread(
const QuicServerInfoMap& main_quic_server_info_map =
http_server_properties_impl_->quic_server_info_map();
if (main_quic_server_info_map.size() > 0) {
- quic_server_info_map = new QuicServerInfoMap(kMaxQuicServersToPersist);
+ quic_server_info_map =
+ new QuicServerInfoMap(max_server_configs_stored_in_properties());
for (const std::pair<const QuicServerId, std::string>& entry :
main_quic_server_info_map) {
quic_server_info_map->Put(entry.first, entry.second);
« no previous file with comments | « net/http/http_server_properties_manager.h ('k') | net/http/http_server_properties_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698