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

Unified Diff: net/http/http_server_properties_manager.cc

Issue 1158823005: HttpServerProperties - Don't persist if SetServerNetworkStats is called (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_http_props
Patch Set: Always update memory cache Created 5 years, 7 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 9ef28564dc74cfbcbff67b8b33dd0d107d4e4da6..4727ff12b1c4a5dbf690edd8dfe382f526847c23 100644
--- a/net/http/http_server_properties_manager.cc
+++ b/net/http/http_server_properties_manager.cc
@@ -316,12 +316,16 @@ void HttpServerPropertiesManager::SetSupportsQuic(
ScheduleUpdatePrefsOnNetworkThread(SET_SUPPORTS_QUIC);
}
-void HttpServerPropertiesManager::SetServerNetworkStats(
+bool HttpServerPropertiesManager::SetServerNetworkStats(
const HostPortPair& host_port_pair,
ServerNetworkStats stats) {
DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
- http_server_properties_impl_->SetServerNetworkStats(host_port_pair, stats);
- ScheduleUpdatePrefsOnNetworkThread(SET_SERVER_NETWORK_STATS);
+ if (http_server_properties_impl_->SetServerNetworkStats(host_port_pair,
+ stats)) {
+ ScheduleUpdatePrefsOnNetworkThread(SET_SERVER_NETWORK_STATS);
+ return true;
+ }
+ return false;
}
const ServerNetworkStats* HttpServerPropertiesManager::GetServerNetworkStats(

Powered by Google App Engine
This is Rietveld 408576698