| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_UTIL_H_ |
| 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_UTIL_H_ |
| 7 |
| 8 #include "net/base/net_export.h" |
| 9 |
| 10 namespace net { |
| 11 |
| 12 class HostPortPair; |
| 13 class HostResolver; |
| 14 class NetLogWithSource; |
| 15 |
| 16 namespace nqe { |
| 17 |
| 18 namespace internal { |
| 19 |
| 20 // Returns true if the host contained in |host_port_pair| is a host in a |
| 21 // private Internet as defined by RFC 1918 or if the requests to |
| 22 // |host_port_pair| are not expected to generate useful network quality |
| 23 // information. This includes localhost, hosts on private subnets, and |
| 24 // hosts on subnets that are reserved for specific usage, and are unlikely |
| 25 // to be used by public web servers. |
| 26 // To make this determination, IsPrivateHost() makes the best |
| 27 // effort estimate including trying to resolve the host in the |
| 28 // |host_port_pair|. The method is synchronous. |
| 29 // |host_resolver| must not be null. |
| 30 NET_EXPORT_PRIVATE bool IsPrivateHost(HostResolver* host_resolver, |
| 31 const HostPortPair& host_port_pair, |
| 32 const NetLogWithSource& net_log); |
| 33 |
| 34 } // namespace internal |
| 35 |
| 36 } // namespace nqe |
| 37 |
| 38 } // namespace net |
| 39 |
| 40 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_UTIL_H_ |
| OLD | NEW |