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 |
207 bool HttpServerPropertiesManager::IsAlternativeServiceBroken( | 215 bool HttpServerPropertiesManager::IsAlternativeServiceBroken( |
208 const AlternativeService& alternative_service) { | 216 const AlternativeService& alternative_service) { |
209 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 217 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
210 return http_server_properties_impl_->IsAlternativeServiceBroken( | 218 return http_server_properties_impl_->IsAlternativeServiceBroken( |
211 alternative_service); | 219 alternative_service); |
212 } | 220 } |
213 | 221 |
214 bool HttpServerPropertiesManager::WasAlternateProtocolRecentlyBroken( | 222 bool HttpServerPropertiesManager::WasAlternateProtocolRecentlyBroken( |
215 const HostPortPair& server) { | 223 const HostPortPair& server) { |
216 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 224 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 server_network_stats_dict); | 889 server_network_stats_dict); |
882 } | 890 } |
883 | 891 |
884 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { | 892 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { |
885 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); | 893 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); |
886 if (!setting_prefs_) | 894 if (!setting_prefs_) |
887 ScheduleUpdateCacheOnPrefThread(); | 895 ScheduleUpdateCacheOnPrefThread(); |
888 } | 896 } |
889 | 897 |
890 } // namespace net | 898 } // namespace net |
OLD | NEW |