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

Unified Diff: net/http/http_server_properties_manager.cc

Issue 1159853005: HttpServerProperties - Don't persist if SetSupportsSpdy is called with (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@persist_SET_SERVER_NETWORK_STATS
Patch Set: Minor cleanup 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
« 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 68a558322d5f9a387dece09694a5689c87a34d13..03772737e31ee691163a30f5ea2b33ef613d9997 100644
--- a/net/http/http_server_properties_manager.cc
+++ b/net/http/http_server_properties_manager.cc
@@ -155,12 +155,20 @@ bool HttpServerPropertiesManager::SupportsRequestPriority(
return http_server_properties_impl_->SupportsRequestPriority(server);
}
+bool HttpServerPropertiesManager::GetSupportsSpdy(const HostPortPair& server) {
+ DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
+ return http_server_properties_impl_->GetSupportsSpdy(server);
+}
+
void HttpServerPropertiesManager::SetSupportsSpdy(const HostPortPair& server,
bool support_spdy) {
DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
+ bool old_support_spdy = http_server_properties_impl_->GetSupportsSpdy(server);
http_server_properties_impl_->SetSupportsSpdy(server, support_spdy);
- ScheduleUpdatePrefsOnNetworkThread(SUPPORTS_SPDY);
+ bool new_support_spdy = http_server_properties_impl_->GetSupportsSpdy(server);
+ if (old_support_spdy != new_support_spdy)
+ ScheduleUpdatePrefsOnNetworkThread(SUPPORTS_SPDY);
}
bool HttpServerPropertiesManager::RequiresHTTP11(const HostPortPair& server) {
« 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