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

Unified Diff: net/nqe/network_quality_estimator_util.h

Issue 2936823002: NQE: Exclude network observations from private networks (Closed)
Patch Set: ps 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 side-by-side diff with in-line comments
Download patch
Index: net/nqe/network_quality_estimator_util.h
diff --git a/net/nqe/network_quality_estimator_util.h b/net/nqe/network_quality_estimator_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..8557eca57e9509c750efce6d8ca46669962e11a8
--- /dev/null
+++ b/net/nqe/network_quality_estimator_util.h
@@ -0,0 +1,34 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_UTIL_H_
+#define NET_NQE_NETWORK_QUALITY_ESTIMATOR_UTIL_H_
+
+#include "net/base/net_export.h"
+
+namespace net {
+
+class HostPortPair;
+class HostResolver;
+class NetLogWithSource;
+
+namespace nqe {
+
+namespace internal {
+
+// Returns true if the host contained in |host_port_pair| is a host in a
+// private Internet as defined by RFC 1918. IsPrivateHost() makes the best
bengr 2017/06/13 20:35:36 Add to the comment that these are hosts with IP ad
mmenke 2017/06/14 18:23:31 This is actually not what the method is doing. IP
tbansal1 2017/06/16 00:57:42 Right. I have added few more comments to the metho
+// effort estimate including trying to resolve the host in the
+// |host_port_pair|. The method is synchronous.
+NET_EXPORT_PRIVATE bool IsPrivateHost(HostResolver* host_resolver,
bengr 2017/06/13 20:35:36 This seems like something more generic than nqe. P
tbansal1 2017/06/16 00:57:42 We can think about moving it to a more common plac
+ const HostPortPair& host_port_pair,
+ const NetLogWithSource& net_log);
+
+} // namespace internal
+
+} // namespace nqe
+
+} // namespace net
+
+#endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698