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

Unified Diff: net/nqe/network_quality_estimator.cc

Issue 2702013002: NQE: Move recording of metrics to when the response headers are received (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | 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 1e0b7a64cbde2c9c94afd31c7b3d6a07974e4653..7adb2ac2a334b2b3365e21e728fb7a42536fb17b 100644
--- a/net/nqe/network_quality_estimator.cc
+++ b/net/nqe/network_quality_estimator.cc
@@ -415,8 +415,6 @@ void NetworkQualityEstimator::NotifyStartTransaction(
effective_connection_type_at_last_main_frame_ = effective_connection_type_;
estimated_quality_at_last_main_frame_ = network_quality_;
- RecordMetricsOnMainFrameRequest();
-
// Post the tasks which will run in the future and record the estimation
// accuracy based on the observations received between now and the time of
// task execution. Posting the task at different intervals makes it
@@ -444,8 +442,10 @@ void NetworkQualityEstimator::NotifyHeadersReceived(const URLRequest& request) {
return;
}
- if (request.load_flags() & LOAD_MAIN_FRAME_DEPRECATED)
+ if (request.load_flags() & LOAD_MAIN_FRAME_DEPRECATED) {
+ RecordMetricsOnMainFrameRequest();
MaybeQueryExternalEstimateProvider();
+ }
LoadTimingInfo load_timing_info;
request.GetLoadTimingInfo(&load_timing_info);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698