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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 799643003: Add an event time parameter to didStartProvisionalLoad callbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « content/renderer/render_frame_impl.h ('k') | content/shell/renderer/test_runner/web_frame_test_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index e3bc2e89a134635bff096a58617184f62a9b0d29..27fca3f3e236aa66420b26452fbf787dcb43d57a 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2173,7 +2173,8 @@ void RenderFrameImpl::didCreateDataSource(blink::WebLocalFrame* frame,
}
void RenderFrameImpl::didStartProvisionalLoad(blink::WebLocalFrame* frame,
- bool is_transition_navigation) {
+ bool is_transition_navigation,
+ double triggering_event_time) {
DCHECK(!frame_ || frame_ == frame);
WebDataSource* ds = frame->provisionalDataSource();
@@ -2192,10 +2193,9 @@ void RenderFrameImpl::didStartProvisionalLoad(blink::WebLocalFrame* frame,
"Heard swappedout:// when not swapped out.";
// Update the request time if WebKit has better knowledge of it.
- if (document_state->request_time().is_null()) {
- double event_time = ds->triggeringEventTime();
- if (event_time != 0.0)
- document_state->set_request_time(Time::FromDoubleT(event_time));
+ if (document_state->request_time().is_null() &&
+ triggering_event_time != 0.0) {
+ document_state->set_request_time(Time::FromDoubleT(triggering_event_time));
}
// Start time is only set after request time.
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/shell/renderer/test_runner/web_frame_test_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698