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

Unified Diff: net/http/http_server_properties_manager.cc

Issue 2699003002: Clear cached QUIC network stats when a QUIC handshake fails. (Closed)
Patch Set: Created 3 years, 10 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_manager.cc
diff --git a/net/http/http_server_properties_manager.cc b/net/http/http_server_properties_manager.cc
index 4130a57a4872d81799c523ba4d5507efce24e102..520b0b311398ac403f14968e657e71d467a2c695 100644
--- a/net/http/http_server_properties_manager.cc
+++ b/net/http/http_server_properties_manager.cc
@@ -311,6 +311,16 @@ void HttpServerPropertiesManager::SetServerNetworkStats(
ScheduleUpdatePrefsOnNetworkThread(SET_SERVER_NETWORK_STATS);
}
+void HttpServerPropertiesManager::ClearServerNetworkStats(
+ const url::SchemeHostPort& server) {
+ DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
+ bool need_update =
+ http_server_properties_impl_->GetServerNetworkStats(server) != nullptr;
+ http_server_properties_impl_->ClearServerNetworkStats(server);
+ if (need_update)
+ ScheduleUpdatePrefsOnNetworkThread(CLEAR_SERVER_NETWORK_STATS);
Jana 2017/02/17 02:52:12 What's this for?
Ryan Hamilton 2017/02/17 03:41:53 The server properties manager persists the propert
Jana 2017/02/17 05:42:33 Gotcha. Ok, makes sense, thanks.
+}
+
const ServerNetworkStats* HttpServerPropertiesManager::GetServerNetworkStats(
const url::SchemeHostPort& server) {
DCHECK(network_task_runner_->RunsTasksOnCurrentThread());

Powered by Google App Engine
This is Rietveld 408576698