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

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

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « net/http/http_server_properties_manager.h ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(
150 const net::HostPortPair& server) {
151 DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
152 return http_server_properties_impl_->RequiresHTTP11(server);
153 }
154
155 void HttpServerPropertiesManager::SetHTTP11Required(
156 const net::HostPortPair& server) {
157 DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
158
159 http_server_properties_impl_->SetHTTP11Required(server);
160 ScheduleUpdatePrefsOnNetworkThread();
161 }
162
163 void HttpServerPropertiesManager::MaybeForceHTTP11(const HostPortPair& server,
164 SSLConfig* ssl_config) {
165 DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
166 http_server_properties_impl_->MaybeForceHTTP11(server, ssl_config);
167 }
168
149 bool HttpServerPropertiesManager::HasAlternateProtocol( 169 bool HttpServerPropertiesManager::HasAlternateProtocol(
150 const HostPortPair& server) { 170 const HostPortPair& server) {
151 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); 171 DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
152 return http_server_properties_impl_->HasAlternateProtocol(server); 172 return http_server_properties_impl_->HasAlternateProtocol(server);
153 } 173 }
154 174
155 AlternateProtocolInfo HttpServerPropertiesManager::GetAlternateProtocol( 175 AlternateProtocolInfo HttpServerPropertiesManager::GetAlternateProtocol(
156 const HostPortPair& server) { 176 const HostPortPair& server) {
157 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); 177 DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
158 return http_server_properties_impl_->GetAlternateProtocol(server); 178 return http_server_properties_impl_->GetAlternateProtocol(server);
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 completion.Run(); 858 completion.Run();
839 } 859 }
840 860
841 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { 861 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() {
842 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); 862 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread());
843 if (!setting_prefs_) 863 if (!setting_prefs_)
844 ScheduleUpdateCacheOnPrefThread(); 864 ScheduleUpdateCacheOnPrefThread();
845 } 865 }
846 866
847 } // namespace net 867 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_server_properties_manager.h ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698