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 1a1ab79c48648509c3619fdd757476d62cb5a86c..d4faf0ee8a649597a95209ff0345c7d676a928cd 100644 |
--- a/net/http/http_server_properties_manager.cc |
+++ b/net/http/http_server_properties_manager.cc |
@@ -245,8 +245,15 @@ bool HttpServerPropertiesManager::WasAlternativeServiceRecentlyBroken( |
void HttpServerPropertiesManager::ConfirmAlternativeService( |
const AlternativeService& alternative_service) { |
DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
+ bool old_value = http_server_properties_impl_->IsAlternativeServiceBroken( |
+ alternative_service); |
http_server_properties_impl_->ConfirmAlternativeService(alternative_service); |
- ScheduleUpdatePrefsOnNetworkThread(CONFIRM_ALTERNATIVE_SERVICE); |
+ bool new_value = http_server_properties_impl_->IsAlternativeServiceBroken( |
+ alternative_service); |
+ // For persisting, we only care about the value returned by |
+ // IsAlternativeServiceBroken. If that value changes, then call persist. |
+ if (old_value != new_value) |
+ ScheduleUpdatePrefsOnNetworkThread(CONFIRM_ALTERNATIVE_SERVICE); |
} |
void HttpServerPropertiesManager::ClearAlternativeService( |