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

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

Issue 989273005: Add MarkAlternativeServiceRecentlyBroken. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 ScheduleUpdatePrefsOnNetworkThread(); 197 ScheduleUpdatePrefsOnNetworkThread();
198 } 198 }
199 199
200 void HttpServerPropertiesManager::SetBrokenAlternateProtocol( 200 void HttpServerPropertiesManager::SetBrokenAlternateProtocol(
201 const HostPortPair& server) { 201 const HostPortPair& server) {
202 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); 202 DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
203 http_server_properties_impl_->SetBrokenAlternateProtocol(server); 203 http_server_properties_impl_->SetBrokenAlternateProtocol(server);
204 ScheduleUpdatePrefsOnNetworkThread(); 204 ScheduleUpdatePrefsOnNetworkThread();
205 } 205 }
206 206
207 void HttpServerPropertiesManager::MarkAlternativeServiceRecentlyBroken(
208 const AlternativeService& alternative_service) {
209 DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
210 http_server_properties_impl_->MarkAlternativeServiceRecentlyBroken(
211 alternative_service);
212 ScheduleUpdatePrefsOnNetworkThread();
213 }
214
207 bool HttpServerPropertiesManager::IsAlternativeServiceBroken( 215 bool HttpServerPropertiesManager::IsAlternativeServiceBroken(
208 const AlternativeService& alternative_service) { 216 const AlternativeService& alternative_service) {
209 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); 217 DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
210 return http_server_properties_impl_->IsAlternativeServiceBroken( 218 return http_server_properties_impl_->IsAlternativeServiceBroken(
211 alternative_service); 219 alternative_service);
212 } 220 }
213 221
214 bool HttpServerPropertiesManager::WasAlternateProtocolRecentlyBroken( 222 bool HttpServerPropertiesManager::WasAlternateProtocolRecentlyBroken(
215 const HostPortPair& server) { 223 const HostPortPair& server) {
216 DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); 224 DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 server_network_stats_dict); 892 server_network_stats_dict);
885 } 893 }
886 894
887 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { 895 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() {
888 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); 896 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread());
889 if (!setting_prefs_) 897 if (!setting_prefs_)
890 ScheduleUpdateCacheOnPrefThread(); 898 ScheduleUpdateCacheOnPrefThread();
891 } 899 }
892 900
893 } // namespace net 901 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698