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

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

Issue 2936823002: NQE: Exclude network observations from private networks (Closed)
Patch Set: bengr comments, rebased 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
« no previous file with comments | « net/nqe/network_quality_estimator.cc ('k') | net/nqe/network_quality_estimator_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // |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_
OLDNEW
« no previous file with comments | « net/nqe/network_quality_estimator.cc ('k') | net/nqe/network_quality_estimator_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698