| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 http_server_properties_impl_->SetHTTP11Required(server); | 184 http_server_properties_impl_->SetHTTP11Required(server); |
| 185 ScheduleUpdatePrefsOnNetworkThread(HTTP_11_REQUIRED); | 185 ScheduleUpdatePrefsOnNetworkThread(HTTP_11_REQUIRED); |
| 186 } | 186 } |
| 187 | 187 |
| 188 void HttpServerPropertiesManager::MaybeForceHTTP11(const HostPortPair& server, | 188 void HttpServerPropertiesManager::MaybeForceHTTP11(const HostPortPair& server, |
| 189 SSLConfig* ssl_config) { | 189 SSLConfig* ssl_config) { |
| 190 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 190 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
| 191 http_server_properties_impl_->MaybeForceHTTP11(server, ssl_config); | 191 http_server_properties_impl_->MaybeForceHTTP11(server, ssl_config); |
| 192 } | 192 } |
| 193 | 193 |
| 194 AlternativeServiceVector HttpServerPropertiesManager::GetAlternativeServices( | 194 AlternativeServiceInfoVector |
| 195 HttpServerPropertiesManager::GetAlternativeServiceInfos( |
| 195 const url::SchemeHostPort& origin) { | 196 const url::SchemeHostPort& origin) { |
| 196 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 197 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
| 197 return http_server_properties_impl_->GetAlternativeServices(origin); | 198 return http_server_properties_impl_->GetAlternativeServiceInfos(origin); |
| 198 } | 199 } |
| 199 | 200 |
| 200 bool HttpServerPropertiesManager::SetAlternativeService( | 201 bool HttpServerPropertiesManager::SetAlternativeService( |
| 201 const url::SchemeHostPort& origin, | 202 const url::SchemeHostPort& origin, |
| 202 const AlternativeService& alternative_service, | 203 const AlternativeService& alternative_service, |
| 203 base::Time expiration) { | 204 base::Time expiration) { |
| 204 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 205 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
| 205 const bool changed = http_server_properties_impl_->SetAlternativeService( | 206 const bool changed = http_server_properties_impl_->SetAlternativeService( |
| 206 origin, alternative_service, expiration); | 207 origin, alternative_service, expiration); |
| 207 if (changed) { | 208 if (changed) { |
| (...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 if (!setting_prefs_) | 1147 if (!setting_prefs_) |
| 1147 ScheduleUpdateCacheOnPrefThread(); | 1148 ScheduleUpdateCacheOnPrefThread(); |
| 1148 } | 1149 } |
| 1149 | 1150 |
| 1150 void HttpServerPropertiesManager::SetInitialized() { | 1151 void HttpServerPropertiesManager::SetInitialized() { |
| 1151 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 1152 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
| 1152 is_initialized_ = true; | 1153 is_initialized_ = true; |
| 1153 } | 1154 } |
| 1154 | 1155 |
| 1155 } // namespace net | 1156 } // namespace net |
| OLD | NEW |