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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 } | 139 } |
140 | 140 |
141 void HttpServerPropertiesManager::SetSupportsSpdy(const HostPortPair& server, | 141 void HttpServerPropertiesManager::SetSupportsSpdy(const HostPortPair& server, |
142 bool support_spdy) { | 142 bool support_spdy) { |
143 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 143 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
144 | 144 |
145 http_server_properties_impl_->SetSupportsSpdy(server, support_spdy); | 145 http_server_properties_impl_->SetSupportsSpdy(server, support_spdy); |
146 ScheduleUpdatePrefsOnNetworkThread(); | 146 ScheduleUpdatePrefsOnNetworkThread(); |
147 } | 147 } |
148 | 148 |
149 bool HttpServerPropertiesManager::RequiresHTTP11( | 149 bool HttpServerPropertiesManager::RequiresHTTP11(const HostPortPair& server) { |
150 const net::HostPortPair& server) { | |
151 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 150 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
152 return http_server_properties_impl_->RequiresHTTP11(server); | 151 return http_server_properties_impl_->RequiresHTTP11(server); |
153 } | 152 } |
154 | 153 |
155 void HttpServerPropertiesManager::SetHTTP11Required( | 154 void HttpServerPropertiesManager::SetHTTP11Required( |
156 const net::HostPortPair& server) { | 155 const HostPortPair& server) { |
157 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 156 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
158 | 157 |
159 http_server_properties_impl_->SetHTTP11Required(server); | 158 http_server_properties_impl_->SetHTTP11Required(server); |
160 ScheduleUpdatePrefsOnNetworkThread(); | 159 ScheduleUpdatePrefsOnNetworkThread(); |
161 } | 160 } |
162 | 161 |
163 void HttpServerPropertiesManager::MaybeForceHTTP11(const HostPortPair& server, | 162 void HttpServerPropertiesManager::MaybeForceHTTP11(const HostPortPair& server, |
164 SSLConfig* ssl_config) { | 163 SSLConfig* ssl_config) { |
165 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 164 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
166 http_server_properties_impl_->MaybeForceHTTP11(server, ssl_config); | 165 http_server_properties_impl_->MaybeForceHTTP11(server, ssl_config); |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 completion.Run(); | 857 completion.Run(); |
859 } | 858 } |
860 | 859 |
861 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { | 860 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { |
862 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); | 861 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); |
863 if (!setting_prefs_) | 862 if (!setting_prefs_) |
864 ScheduleUpdateCacheOnPrefThread(); | 863 ScheduleUpdateCacheOnPrefThread(); |
865 } | 864 } |
866 | 865 |
867 } // namespace net | 866 } // namespace net |
OLD | NEW |