OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/net/http_server_properties_manager.h" | 5 #include "chrome/browser/net/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/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 ScheduleUpdatePrefsOnIO(); | 170 ScheduleUpdatePrefsOnIO(); |
171 } | 171 } |
172 | 172 |
173 void HttpServerPropertiesManager::SetBrokenAlternateProtocol( | 173 void HttpServerPropertiesManager::SetBrokenAlternateProtocol( |
174 const net::HostPortPair& server) { | 174 const net::HostPortPair& server) { |
175 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 175 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
176 http_server_properties_impl_->SetBrokenAlternateProtocol(server); | 176 http_server_properties_impl_->SetBrokenAlternateProtocol(server); |
177 ScheduleUpdatePrefsOnIO(); | 177 ScheduleUpdatePrefsOnIO(); |
178 } | 178 } |
179 | 179 |
| 180 void HttpServerPropertiesManager::ClearAlternateProtocol( |
| 181 const net::HostPortPair& server) { |
| 182 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 183 http_server_properties_impl_->ClearAlternateProtocol(server); |
| 184 ScheduleUpdatePrefsOnIO(); |
| 185 } |
| 186 |
180 const net::AlternateProtocolMap& | 187 const net::AlternateProtocolMap& |
181 HttpServerPropertiesManager::alternate_protocol_map() const { | 188 HttpServerPropertiesManager::alternate_protocol_map() const { |
182 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 189 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
183 return http_server_properties_impl_->alternate_protocol_map(); | 190 return http_server_properties_impl_->alternate_protocol_map(); |
184 } | 191 } |
185 | 192 |
186 const net::SettingsMap& | 193 const net::SettingsMap& |
187 HttpServerPropertiesManager::GetSpdySettings( | 194 HttpServerPropertiesManager::GetSpdySettings( |
188 const net::HostPortPair& host_port_pair) const { | 195 const net::HostPortPair& host_port_pair) const { |
189 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 196 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 completion.Run(); | 709 completion.Run(); |
703 } | 710 } |
704 | 711 |
705 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { | 712 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { |
706 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 713 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
707 if (!setting_prefs_) | 714 if (!setting_prefs_) |
708 ScheduleUpdateCacheOnUI(); | 715 ScheduleUpdateCacheOnUI(); |
709 } | 716 } |
710 | 717 |
711 } // namespace chrome_browser_net | 718 } // namespace chrome_browser_net |
OLD | NEW |