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

Unified Diff: net/nqe/throughput_analyzer.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/nqe/network_quality_estimator_util_unittest.cc ('k') | net/nqe/throughput_analyzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/nqe/throughput_analyzer.h
diff --git a/net/nqe/throughput_analyzer.h b/net/nqe/throughput_analyzer.h
index 6aeae1657370cd2fb4205680695493d69619a415..00bf7a66cafe90b9ceddaf0123b06a9e2c5ac033 100644
--- a/net/nqe/throughput_analyzer.h
+++ b/net/nqe/throughput_analyzer.h
@@ -14,6 +14,7 @@
#include "base/threading/thread_checker.h"
#include "base/time/time.h"
#include "net/base/net_export.h"
+#include "net/log/net_log_with_source.h"
namespace {
typedef base::Callback<void(int32_t)> ThroughputObservationCallback;
@@ -60,7 +61,8 @@ class NET_EXPORT_PRIVATE ThroughputAnalyzer {
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
ThroughputObservationCallback throughput_observation_callback,
bool use_local_host_requests_for_tests,
- bool use_smaller_responses_for_tests);
+ bool use_smaller_responses_for_tests,
+ const NetLogWithSource& net_log);
virtual ~ThroughputAnalyzer();
// Notifies |this| that the headers of |request| are about to be sent.
@@ -83,6 +85,10 @@ class NET_EXPORT_PRIVATE ThroughputAnalyzer {
// estimation.
void SetUseSmallResponsesForTesting(bool use_small_responses);
+ // Returns true if throughput is currently tracked by a throughput
+ // observation window.
+ bool IsCurrentlyTrackingThroughput() const;
+
protected:
// Exposed for testing.
bool disable_throughput_measurements() const {
@@ -122,10 +128,6 @@ class NET_EXPORT_PRIVATE ThroughputAnalyzer {
// EndThroughputObservationWindow ends the throughput observation window.
void EndThroughputObservationWindow();
- // Returns true if throughput is currently tracked by a throughput
- // observation window.
- bool IsCurrentlyTrackingThroughput() const;
-
// Returns true if the |request| degrades the accuracy of the throughput
// observation window. A local request or a request that spans a connection
// change degrades the accuracy of the throughput computation.
@@ -178,6 +180,8 @@ class NET_EXPORT_PRIVATE ThroughputAnalyzer {
base::ThreadChecker thread_checker_;
+ NetLogWithSource net_log_;
+
DISALLOW_COPY_AND_ASSIGN(ThroughputAnalyzer);
};
« no previous file with comments | « net/nqe/network_quality_estimator_util_unittest.cc ('k') | net/nqe/throughput_analyzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698