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

Side by Side Diff: net/nqe/network_quality_estimator_util.h

Issue 2936823002: NQE: Exclude network observations from private networks (Closed)
Patch Set: bengr, mmenke comments Created 3 years, 6 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
(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 NET_EXPORT_PRIVATE bool IsPrivateHost(HostResolver* host_resolver,
30 const HostPortPair& host_port_pair,
31 const NetLogWithSource& net_log);
32
33 } // namespace internal
34
35 } // namespace nqe
36
37 } // namespace net
38
39 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698