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

Unified Diff: net/nqe/network_quality_estimator_test_util.h

Issue 2593243003: Add network quality change events to net log (Closed)
Patch Set: rebased Created 3 years, 11 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.cc ('k') | net/nqe/network_quality_estimator_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/nqe/network_quality_estimator_test_util.h
diff --git a/net/nqe/network_quality_estimator_test_util.h b/net/nqe/network_quality_estimator_test_util.h
index 6faa363b328c915cdf4c9e4b67dcd1283d6f1e8e..d4685e493e1d336d76d9a7e1145709dcf9f50097 100644
--- a/net/nqe/network_quality_estimator_test_util.h
+++ b/net/nqe/network_quality_estimator_test_util.h
@@ -15,6 +15,7 @@
#include "base/optional.h"
#include "base/time/time.h"
#include "net/base/network_change_notifier.h"
+#include "net/log/net_log.h"
#include "net/nqe/effective_connection_type.h"
#include "net/nqe/network_quality_estimator.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
@@ -23,6 +24,7 @@
namespace net {
+class BoundTestNetLog;
class ExternalEstimateProvider;
// Helps in setting the current network type and id.
@@ -43,7 +45,8 @@ class TestNetworkQualityEstimator : public NetworkQualityEstimator {
const std::map<std::string, std::string>& variation_params,
bool allow_local_host_requests_for_tests,
bool allow_smaller_responses_for_tests,
- bool add_default_platform_observations);
+ bool add_default_platform_observations,
+ std::unique_ptr<BoundTestNetLog> net_log);
~TestNetworkQualityEstimator() override;
@@ -175,6 +178,9 @@ class TestNetworkQualityEstimator : public NetworkQualityEstimator {
double RandDouble() const override;
+ // Returns the number of entries in |net_log_| that have type set to |type|.
+ int GetEntriesCount(NetLogEventType type) const;
+
using NetworkQualityEstimator::SetTickClockForTesting;
using NetworkQualityEstimator::OnConnectionTypeChanged;
@@ -223,6 +229,9 @@ class TestNetworkQualityEstimator : public NetworkQualityEstimator {
LocalHttpTestServer embedded_test_server_;
+ // Net log provided to network quality estimator.
+ std::unique_ptr<net::BoundTestNetLog> net_log_;
+
DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimator);
};
« no previous file with comments | « net/nqe/network_quality_estimator.cc ('k') | net/nqe/network_quality_estimator_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698