| 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 2ded6bf8011420011a4c3b499793aa8c00621490..76bf74fd90fd079dad30d78a2e068fd9ee49a68b 100644
|
| --- a/chrome/browser/prerender/prerender_tab_helper.h
|
| +++ b/chrome/browser/prerender/prerender_tab_helper.h
|
| @@ -52,6 +52,14 @@ class PrerenderTabHelper
|
| // Called when a control prerender is resolved. Applies to the next load.
|
| void WouldHavePrerenderedNextLoad(Origin origin);
|
|
|
| + // Computes the time delta from prerender load start to swapped in time. This
|
| + // adjustment is the difference between actual load or paint times and
|
| + // perceived times. Returns false if this is called outside the interval from
|
| + // swap in to page load.
|
| + bool LoadToPerceivedDelta(base::TimeDelta* delta);
|
| +
|
| + Origin origin() const { return origin_; }
|
| +
|
| private:
|
| explicit PrerenderTabHelper(content::WebContents* web_contents);
|
| friend class content::WebContentsUserData<PrerenderTabHelper>;
|
| @@ -97,6 +105,14 @@ class PrerenderTabHelper
|
| // swapped in).
|
| base::TimeTicks actual_load_start_;
|
|
|
| + // Record the most recent load and swap times. These differ from
|
| + // |pplt_load_start_| and |actual_load_start_| in that they are not reset in
|
| + // various circumstances, like a load being stopped. There is no guarantee
|
| + // about their correctness. For example, if a load somehow starts after a
|
| + // swap, then |last_load_ > last_swap_|.
|
| + base::TimeTicks last_load_;
|
| + base::TimeTicks last_swap_;
|
| +
|
| // Current URL being loaded.
|
| GURL url_;
|
|
|
|
|