| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/http/http_server_properties_manager.h" | 5 #include "net/http/http_server_properties_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 ScheduleUpdatePrefsOnNetworkThread(); | 197 ScheduleUpdatePrefsOnNetworkThread(); |
| 198 } | 198 } |
| 199 | 199 |
| 200 void HttpServerPropertiesManager::SetBrokenAlternateProtocol( | 200 void HttpServerPropertiesManager::SetBrokenAlternateProtocol( |
| 201 const HostPortPair& server) { | 201 const HostPortPair& server) { |
| 202 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 202 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
| 203 http_server_properties_impl_->SetBrokenAlternateProtocol(server); | 203 http_server_properties_impl_->SetBrokenAlternateProtocol(server); |
| 204 ScheduleUpdatePrefsOnNetworkThread(); | 204 ScheduleUpdatePrefsOnNetworkThread(); |
| 205 } | 205 } |
| 206 | 206 |
| 207 void HttpServerPropertiesManager::MarkAlternativeServiceRecentlyBroken( | |
| 208 const AlternativeService& alternative_service) { | |
| 209 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | |
| 210 http_server_properties_impl_->MarkAlternativeServiceRecentlyBroken( | |
| 211 alternative_service); | |
| 212 ScheduleUpdatePrefsOnNetworkThread(); | |
| 213 } | |
| 214 | |
| 215 bool HttpServerPropertiesManager::IsAlternativeServiceBroken( | 207 bool HttpServerPropertiesManager::IsAlternativeServiceBroken( |
| 216 const AlternativeService& alternative_service) { | 208 const AlternativeService& alternative_service) { |
| 217 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 209 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
| 218 return http_server_properties_impl_->IsAlternativeServiceBroken( | 210 return http_server_properties_impl_->IsAlternativeServiceBroken( |
| 219 alternative_service); | 211 alternative_service); |
| 220 } | 212 } |
| 221 | 213 |
| 222 bool HttpServerPropertiesManager::WasAlternateProtocolRecentlyBroken( | 214 bool HttpServerPropertiesManager::WasAlternateProtocolRecentlyBroken( |
| 223 const HostPortPair& server) { | 215 const HostPortPair& server) { |
| 224 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 216 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 server_network_stats_dict); | 881 server_network_stats_dict); |
| 890 } | 882 } |
| 891 | 883 |
| 892 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { | 884 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { |
| 893 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); | 885 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); |
| 894 if (!setting_prefs_) | 886 if (!setting_prefs_) |
| 895 ScheduleUpdateCacheOnPrefThread(); | 887 ScheduleUpdateCacheOnPrefThread(); |
| 896 } | 888 } |
| 897 | 889 |
| 898 } // namespace net | 890 } // namespace net |
| OLD | NEW |