Index: chrome/browser/predictors/resource_prefetch_predictor.h |
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.h b/chrome/browser/predictors/resource_prefetch_predictor.h |
index fa2cfd18367f1742e1cab08e8afa46b2aea35a45..5d3d9b46d937dd9e92a9e38cbed3998094f9c8e4 100644 |
--- a/chrome/browser/predictors/resource_prefetch_predictor.h |
+++ b/chrome/browser/predictors/resource_prefetch_predictor.h |
@@ -112,6 +112,7 @@ class ResourcePrefetchPredictor |
GURL resource_url; |
content::ResourceType resource_type; |
net::RequestPriority priority; |
+ bool before_first_contentful_paint; |
alexilin
2017/03/17 14:46:46
You need to initialize this field in URLRequestSum
trevordixon
2017/03/27 12:30:08
Done.
|
// Only for responses. |
std::string mime_type; |
@@ -136,6 +137,7 @@ class ResourcePrefetchPredictor |
GURL main_frame_url; |
GURL initial_url; |
+ base::TimeDelta first_contentful_paint_time; |
alexilin
2017/03/17 14:46:46
Unused field.
trevordixon
2017/03/27 12:30:08
Oops.
|
// Stores all subresource requests within a single navigation, from initial |
// main frame request to navigation completion. |
@@ -203,6 +205,8 @@ class ResourcePrefetchPredictor |
// Called when the main frame of a page completes loading. |
void RecordMainFrameLoadComplete(const NavigationID& navigation_id); |
+ void RecordFirstContentfulPaint(const NavigationID navigation_id); |
alexilin
2017/03/17 14:46:46
Please, add a comment to this function.
trevordixon
2017/03/27 12:30:08
Done.
|
+ |
// Starts prefetching if it is enabled for |origin| and prefetching data |
// exists for the |main_frame_url| either at the URL or at the host level. |
void StartPrefetching(const GURL& main_frame_url, PrefetchOrigin origin); |