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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 Clear(base::Closure()); | 126 Clear(base::Closure()); |
127 } | 127 } |
128 | 128 |
129 void HttpServerPropertiesManager::Clear(const base::Closure& completion) { | 129 void HttpServerPropertiesManager::Clear(const base::Closure& completion) { |
130 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 130 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
131 | 131 |
132 http_server_properties_impl_->Clear(); | 132 http_server_properties_impl_->Clear(); |
133 UpdatePrefsFromCacheOnNetworkThread(completion); | 133 UpdatePrefsFromCacheOnNetworkThread(completion); |
134 } | 134 } |
135 | 135 |
136 bool HttpServerPropertiesManager::SupportsSpdy(const HostPortPair& server) { | 136 bool HttpServerPropertiesManager::SupportsRequestPriority( |
| 137 const HostPortPair& server) { |
137 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 138 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
138 return http_server_properties_impl_->SupportsSpdy(server); | 139 return http_server_properties_impl_->SupportsRequestPriority(server); |
139 } | 140 } |
140 | 141 |
141 void HttpServerPropertiesManager::SetSupportsSpdy(const HostPortPair& server, | 142 void HttpServerPropertiesManager::SetSupportsSpdy(const HostPortPair& server, |
142 bool support_spdy) { | 143 bool support_spdy) { |
143 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); | 144 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
144 | 145 |
145 http_server_properties_impl_->SetSupportsSpdy(server, support_spdy); | 146 http_server_properties_impl_->SetSupportsSpdy(server, support_spdy); |
146 ScheduleUpdatePrefsOnNetworkThread(); | 147 ScheduleUpdatePrefsOnNetworkThread(); |
147 } | 148 } |
148 | 149 |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 completion.Run(); | 859 completion.Run(); |
859 } | 860 } |
860 | 861 |
861 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { | 862 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { |
862 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); | 863 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); |
863 if (!setting_prefs_) | 864 if (!setting_prefs_) |
864 ScheduleUpdateCacheOnPrefThread(); | 865 ScheduleUpdateCacheOnPrefThread(); |
865 } | 866 } |
866 | 867 |
867 } // namespace net | 868 } // namespace net |
OLD | NEW |