Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: net/http/http_server_properties_manager.cc

Issue 2886273002: Change GetAlternativeServies to return alternative service infos. (Closed)
Patch Set: address comments in ps #3 Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/http/http_server_properties_manager.h ('k') | net/http/http_server_properties_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698