diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-07-07 11:39:03 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-07-07 10:30:25 +0000 |
commit | b80be2a302fe1e662a4a2b269d7ee8b7875581df (patch) | |
tree | 3a6e79ab9bc38ff554f77127b250edde8e476119 /chromium/net/http/http_server_properties_manager.cc | |
parent | 813fbf95af77a531c57a8c497345ad2c61d475b3 (diff) | |
download | qtwebengine-chromium-b80be2a302fe1e662a4a2b269d7ee8b7875581df.tar.gz |
BASELINE: Update to chromium 44.0.2403.80
Change-Id: Ib190ddcbbb5f312742c16d159bdfe9dbf7360c8a
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'chromium/net/http/http_server_properties_manager.cc')
-rw-r--r-- | chromium/net/http/http_server_properties_manager.cc | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/chromium/net/http/http_server_properties_manager.cc b/chromium/net/http/http_server_properties_manager.cc index a52036ec316..669b091d13c 100644 --- a/chromium/net/http/http_server_properties_manager.cc +++ b/chromium/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( @@ -329,16 +336,29 @@ void HttpServerPropertiesManager::SetSupportsQuic( bool used_quic, const IPAddressNumber& address) { DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); + IPAddressNumber old_last_quic_addr; + http_server_properties_impl_->GetSupportsQuic(&old_last_quic_addr); http_server_properties_impl_->SetSupportsQuic(used_quic, address); - ScheduleUpdatePrefsOnNetworkThread(SET_SUPPORTS_QUIC); + IPAddressNumber new_last_quic_addr; + http_server_properties_impl_->GetSupportsQuic(&new_last_quic_addr); + if (old_last_quic_addr != new_last_quic_addr) + ScheduleUpdatePrefsOnNetworkThread(SET_SUPPORTS_QUIC); } void HttpServerPropertiesManager::SetServerNetworkStats( const HostPortPair& host_port_pair, ServerNetworkStats stats) { DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); + ServerNetworkStats old_stats; + const ServerNetworkStats* old_stats_ptr = + http_server_properties_impl_->GetServerNetworkStats(host_port_pair); + if (http_server_properties_impl_->GetServerNetworkStats(host_port_pair)) + old_stats = *old_stats_ptr; http_server_properties_impl_->SetServerNetworkStats(host_port_pair, stats); - ScheduleUpdatePrefsOnNetworkThread(SET_SERVER_NETWORK_STATS); + ServerNetworkStats new_stats = + *(http_server_properties_impl_->GetServerNetworkStats(host_port_pair)); + if (old_stats != new_stats) + ScheduleUpdatePrefsOnNetworkThread(SET_SERVER_NETWORK_STATS); } const ServerNetworkStats* HttpServerPropertiesManager::GetServerNetworkStats( |