| 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_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 &used_quic)) { | 750 &used_quic)) { |
| 751 DVLOG(1) << "Malformed SupportsQuic"; | 751 DVLOG(1) << "Malformed SupportsQuic"; |
| 752 return false; | 752 return false; |
| 753 } | 753 } |
| 754 if (!used_quic) | 754 if (!used_quic) |
| 755 return false; | 755 return false; |
| 756 | 756 |
| 757 std::string address; | 757 std::string address; |
| 758 if (!supports_quic_dict->GetStringWithoutPathExpansion(kAddressKey, | 758 if (!supports_quic_dict->GetStringWithoutPathExpansion(kAddressKey, |
| 759 &address) || | 759 &address) || |
| 760 !IPAddress::FromIPLiteral(address, last_quic_address)) { | 760 !last_quic_address->AssignFromIPLiteral(address)) { |
| 761 DVLOG(1) << "Malformed SupportsQuic"; | 761 DVLOG(1) << "Malformed SupportsQuic"; |
| 762 return false; | 762 return false; |
| 763 } | 763 } |
| 764 return true; | 764 return true; |
| 765 } | 765 } |
| 766 | 766 |
| 767 bool HttpServerPropertiesManager::AddToNetworkStatsMap( | 767 bool HttpServerPropertiesManager::AddToNetworkStatsMap( |
| 768 const HostPortPair& server, | 768 const HostPortPair& server, |
| 769 const base::DictionaryValue& server_pref_dict, | 769 const base::DictionaryValue& server_pref_dict, |
| 770 ServerNetworkStatsMap* network_stats_map) { | 770 ServerNetworkStatsMap* network_stats_map) { |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1260 quic_servers_dict); | 1260 quic_servers_dict); |
| 1261 } | 1261 } |
| 1262 | 1262 |
| 1263 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { | 1263 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { |
| 1264 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); | 1264 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); |
| 1265 if (!setting_prefs_) | 1265 if (!setting_prefs_) |
| 1266 ScheduleUpdateCacheOnPrefThread(); | 1266 ScheduleUpdateCacheOnPrefThread(); |
| 1267 } | 1267 } |
| 1268 | 1268 |
| 1269 } // namespace net | 1269 } // namespace net |
| OLD | NEW |