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

Unified Diff: net/url_request/url_request.cc

Issue 14625012: net: Return LoadTiming information in the case of a cache hit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Response to eroman. Created 7 years, 7 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/http/http_transaction_unittest.cc ('k') | net/url_request/url_request_http_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
===================================================================
--- net/url_request/url_request.cc (revision 199488)
+++ net/url_request/url_request.cc (working copy)
@@ -1034,7 +1034,18 @@
// socket is closed and the ClientSocketHandle is Reset, which will happen
// once the body is complete. The start times should already be populated.
if (job_) {
+ // Keep a copy of the two times the URLRequest sets.
+ base::TimeTicks request_start = load_timing_info_.request_start;
+ base::Time request_start_time = load_timing_info_.request_start_time;
+
+ // Clear load times. Shouldn't be neded, but gives the GetLoadTimingInfo a
+ // consistent place to start from.
+ load_timing_info_ = LoadTimingInfo();
job_->GetLoadTimingInfo(&load_timing_info_);
+
+ load_timing_info_.request_start = request_start;
+ load_timing_info_.request_start_time = request_start_time;
+
ConvertRealLoadTimesToBlockingTimes(&load_timing_info_);
}
}
« no previous file with comments | « net/http/http_transaction_unittest.cc ('k') | net/url_request/url_request_http_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698