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

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

Issue 1017453008: Make GetAlternateProtocol return AlternativeService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error. Created 5 years, 9 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 "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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 http_server_properties_impl_->SetHTTP11Required(server); 173 http_server_properties_impl_->SetHTTP11Required(server);
174 ScheduleUpdatePrefsOnNetworkThread(); 174 ScheduleUpdatePrefsOnNetworkThread();
175 } 175 }
176 176
177 void HttpServerPropertiesManager::MaybeForceHTTP11(const HostPortPair& server, 177 void HttpServerPropertiesManager::MaybeForceHTTP11(const HostPortPair& server,
178 SSLConfig* ssl_config) { 178 SSLConfig* ssl_config) {
179 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); 179 DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
180 http_server_properties_impl_->MaybeForceHTTP11(server, ssl_config); 180 http_server_properties_impl_->MaybeForceHTTP11(server, ssl_config);
181 } 181 }
182 182
183 AlternateProtocolInfo HttpServerPropertiesManager::GetAlternateProtocol( 183 AlternativeService HttpServerPropertiesManager::GetAlternativeService(
184 const HostPortPair& server) { 184 const HostPortPair& origin) {
185 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); 185 DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
186 return http_server_properties_impl_->GetAlternateProtocol(server); 186 return http_server_properties_impl_->GetAlternativeService(origin);
187 } 187 }
188 188
189 void HttpServerPropertiesManager::SetAlternateProtocol( 189 void HttpServerPropertiesManager::SetAlternateProtocol(
190 const HostPortPair& server, 190 const HostPortPair& server,
191 uint16 alternate_port, 191 uint16 alternate_port,
192 AlternateProtocol alternate_protocol, 192 AlternateProtocol alternate_protocol,
193 double alternate_probability) { 193 double alternate_probability) {
194 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); 194 DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
195 http_server_properties_impl_->SetAlternateProtocol( 195 http_server_properties_impl_->SetAlternateProtocol(
196 server, alternate_port, alternate_protocol, alternate_probability); 196 server, alternate_port, alternate_protocol, alternate_probability);
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 server_network_stats_dict); 889 server_network_stats_dict);
890 } 890 }
891 891
892 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { 892 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() {
893 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); 893 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread());
894 if (!setting_prefs_) 894 if (!setting_prefs_)
895 ScheduleUpdateCacheOnPrefThread(); 895 ScheduleUpdateCacheOnPrefThread();
896 } 896 }
897 897
898 } // namespace net 898 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698