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

Unified Diff: net/nqe/network_quality_estimator.cc

Issue 2103323007: Exposing NQE on the Browser UI thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mmenke comments Created 4 years, 5 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.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/nqe/network_quality_estimator.cc
diff --git a/net/nqe/network_quality_estimator.cc b/net/nqe/network_quality_estimator.cc
index 7750e2faff832b75c6063e3551e24aa924905d94..347ef949ca519cdf1909c4b28cd2e130c112f367 100644
--- a/net/nqe/network_quality_estimator.cc
+++ b/net/nqe/network_quality_estimator.cc
@@ -730,20 +730,28 @@ void NetworkQualityEstimator::SetUseLocalHostRequestsForTesting(
use_localhost_requests_);
}
void NetworkQualityEstimator::SetUseSmallResponsesForTesting(
bool use_small_responses) {
DCHECK(thread_checker_.CalledOnValidThread());
use_small_responses_ = use_small_responses;
throughput_analyzer_->SetUseSmallResponsesForTesting(use_small_responses_);
}
+void NetworkQualityEstimator::ReportEffectiveConnectionTypeForTesting(
+ EffectiveConnectionType effective_connection_type) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ FOR_EACH_OBSERVER(
+ EffectiveConnectionTypeObserver, effective_connection_type_observer_list_,
+ OnEffectiveConnectionTypeChanged(effective_connection_type));
+}
+
bool NetworkQualityEstimator::RequestProvidesRTTObservation(
const URLRequest& request) const {
DCHECK(thread_checker_.CalledOnValidThread());
return (use_localhost_requests_ || !IsLocalhost(request.url().host())) &&
// Verify that response headers are received, so it can be ensured that
// response is not cached.
!request.response_info().response_time.is_null() &&
!request.was_cached() &&
request.creation_time() >= last_connection_change_;
« no previous file with comments | « net/nqe/network_quality_estimator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698