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

Unified Diff: chrome/browser/prerender/prerender_tab_helper.h

Issue 2423383002: [Prerender] first contentful paint histograms. (Closed)
Patch Set: comments Created 4 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
Index: chrome/browser/prerender/prerender_tab_helper.h
diff --git a/chrome/browser/prerender/prerender_tab_helper.h b/chrome/browser/prerender/prerender_tab_helper.h
index 19fb16e38a7dfd4e3bc44e61d2460016c60fcf2e..96e999531d399348aa165a40af307cbace49a462 100644
--- a/chrome/browser/prerender/prerender_tab_helper.h
+++ b/chrome/browser/prerender/prerender_tab_helper.h
@@ -51,6 +51,10 @@ class PrerenderTabHelper
// Called when a control prerender is resolved. Applies to the next load.
void WouldHavePrerenderedNextLoad(Origin origin);
+ base::TimeTicks last_swap() const { return last_swap_; }
+
+ Origin origin() const { return origin_; }
+
private:
explicit PrerenderTabHelper(content::WebContents* web_contents);
friend class content::WebContentsUserData<PrerenderTabHelper>;
@@ -96,6 +100,10 @@ class PrerenderTabHelper
// swapped in).
base::TimeTicks actual_load_start_;
+ // Record the most recent swap time. This differs from |pplt_load_start_| in
+ // that it is not reset in various circumstances, like a load being stopped.
+ base::TimeTicks last_swap_;
pasko 2016/12/21 18:39:09 My reading of the code suggests that: 1. Instance
mattcary 2016/12/22 10:49:07 "Alarming" seems a bit of a stretch, but sure.
+
// Current URL being loaded.
GURL url_;

Powered by Google App Engine
This is Rietveld 408576698