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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 http_server_properties_impl_->ClearAlternativeService(origin); | 241 http_server_properties_impl_->ClearAlternativeService(origin); |
242 ScheduleUpdatePrefsOnNetworkThread(CLEAR_ALTERNATIVE_SERVICE); | 242 ScheduleUpdatePrefsOnNetworkThread(CLEAR_ALTERNATIVE_SERVICE); |
243 } | 243 } |
244 | 244 |
245 const AlternativeServiceMap& | 245 const AlternativeServiceMap& |
246 HttpServerPropertiesManager::alternative_service_map() const { | 246 HttpServerPropertiesManager::alternative_service_map() const { |
247 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 247 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
248 return http_server_properties_impl_->alternative_service_map(); | 248 return http_server_properties_impl_->alternative_service_map(); |
249 } | 249 } |
250 | 250 |
251 base::Value* HttpServerPropertiesManager::GetAlternativeServiceInfoAsValue() | 251 scoped_ptr<base::Value> |
| 252 HttpServerPropertiesManager::GetAlternativeServiceInfoAsValue() |
252 const { | 253 const { |
253 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 254 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
254 return http_server_properties_impl_->GetAlternativeServiceInfoAsValue(); | 255 return http_server_properties_impl_->GetAlternativeServiceInfoAsValue(); |
255 } | 256 } |
256 | 257 |
257 void HttpServerPropertiesManager::SetAlternativeServiceProbabilityThreshold( | 258 void HttpServerPropertiesManager::SetAlternativeServiceProbabilityThreshold( |
258 double threshold) { | 259 double threshold) { |
259 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 260 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
260 http_server_properties_impl_->SetAlternativeServiceProbabilityThreshold( | 261 http_server_properties_impl_->SetAlternativeServiceProbabilityThreshold( |
261 threshold); | 262 threshold); |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
950 server_network_stats_dict); | 951 server_network_stats_dict); |
951 } | 952 } |
952 | 953 |
953 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { | 954 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { |
954 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); | 955 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); |
955 if (!setting_prefs_) | 956 if (!setting_prefs_) |
956 ScheduleUpdateCacheOnPrefThread(); | 957 ScheduleUpdateCacheOnPrefThread(); |
957 } | 958 } |
958 | 959 |
959 } // namespace net | 960 } // namespace net |
OLD | NEW |