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

Issue 2587443002: predictors: Make speculative_prefetch_predictor work with PlzNavigate (Closed)

Created:
4 years ago by ahemery
Modified:
3 years, 12 months ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

predictors: Make speculative_prefetch_predictor work with PlzNavigate Summary -------- We are now tracking navigations for the ResourcePrefetchPredictor using the tab ids instead of render process and host. Added browser tests to test edge cases that could break the tab_id usage. Details -------- - WebContents is now used to extract the session_id with help from SessionTabHelper::IdForTab() instead of render_frame_host_id + render_process_id - Reworked unit_tests to use this session_id instead - Reworked browser_tests to test for the following cases : Cross Domain Navigation inducing cross process behavior and Navigating to new tabs/window/popup. BUG=650246 Committed: https://crrev.com/62729f8a7e996d8f6b0451e8bcfcd3a124fd2628 Cr-Commit-Position: refs/heads/master@{#440615}

Patch Set 1 #

Patch Set 2 : Reworked Tests #

Total comments: 17

Patch Set 3 : Removed Frame Tree Node Id #

Total comments: 2

Patch Set 4 : From SessionID to SessionID::id_type #

Total comments: 28

Patch Set 5 : Updates after lizeb@ first review and rebase #

Total comments: 13

Patch Set 6 : Small header/namespaces fixes #

Patch Set 7 : Updates after lizeb@ second review #

Total comments: 9

Patch Set 8 : Updates after alexilin@ review #

Total comments: 14

Patch Set 9 : Modified after alexilin@ and lizeb@ reviews #

Total comments: 9

Patch Set 10 : Modified after alexilin@ and lizeb@ reviews + rebase #

Patch Set 11 : Removing very tiny unwanted change #

Patch Set 12 : Added extra safety after lizeb@ offline remark #

Total comments: 6

Patch Set 13 : Modified after alexilin@ review #

Total comments: 7

Patch Set 14 : Modified after alexilin@ comment #

Patch Set 15 : Modified after clamy@ review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+241 lines, -174 lines) Patch
M chrome/browser/net/resource_prefetch_predictor_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/predictors/resource_prefetch_common.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_common.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +12 lines, -27 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 17 chunks +111 lines, -13 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_test_util.h View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_test_util.cc View 1 2 3 4 5 6 7 8 9 4 chunks +5 lines, -11 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_unittest.cc View 1 2 3 4 5 6 7 8 9 24 chunks +100 lines, -105 lines 0 comments Download
M chrome/browser/predictors/resource_prefetcher_unittest.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M testing/buildbot/filters/browser-side-navigation.linux.browser_tests.filter View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 89 (53 generated)
ahemery
First draft for the final part of resource prefetch predictor and plzNavigate compatibility. https://codereview.chromium.org/2587443002/diff/60001/chrome/browser/predictors/resource_prefetch_common.cc File ...
4 years ago (2016-12-19 14:53:42 UTC) #5
Benoit L
Thanks. One high-level comment, will require changes in a bunch of places, so I prefer ...
4 years ago (2016-12-19 16:55:56 UTC) #11
ahemery
Definitely make more sense to have more of a "monitoring" behavior than interfering with the ...
4 years ago (2016-12-20 09:06:46 UTC) #14
Benoit L
Thanks, some more comments. https://codereview.chromium.org/2587443002/diff/120001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2587443002/diff/120001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode94 chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc:94: struct ResourceComparisonParameters { Please remove ...
4 years ago (2016-12-20 09:53:39 UTC) #20
Benoit L
Also, the proper bug number for this CL is 650246. Since this bug is tracked ...
4 years ago (2016-12-20 09:55:55 UTC) #21
ahemery
https://codereview.chromium.org/2587443002/diff/120001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2587443002/diff/120001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode94 chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc:94: struct ResourceComparisonParameters { On 2016/12/20 09:53:39, Benoit L wrote: ...
4 years ago (2016-12-20 13:00:00 UTC) #23
Benoit L
https://codereview.chromium.org/2587443002/diff/140001/chrome/browser/predictors/resource_prefetch_common.h File chrome/browser/predictors/resource_prefetch_common.h (right): https://codereview.chromium.org/2587443002/diff/140001/chrome/browser/predictors/resource_prefetch_common.h#newcode11 chrome/browser/predictors/resource_prefetch_common.h:11: #include "chrome/browser/sessions/session_tab_helper.h" nit: please move the header file inclusion ...
4 years ago (2016-12-20 13:20:50 UTC) #26
ahemery
https://codereview.chromium.org/2587443002/diff/140001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2587443002/diff/140001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode184 chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc:184: std::set<NavigationID>& navigation_ids() { return current_navigation_ids_; } On 2016/12/20 13:20:49, ...
4 years ago (2016-12-20 14:06:35 UTC) #27
alexilin
Thanks. I'm a little bit behind so I send you comments based on 4th patch ...
4 years ago (2016-12-20 14:06:48 UTC) #28
alexilin
Some additional nits (very poor). https://codereview.chromium.org/2587443002/diff/180001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2587443002/diff/180001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode240 chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc:240: // cross domains navigations ...
4 years ago (2016-12-20 14:31:44 UTC) #31
ahemery
Investigating on the host features to see how do it as clean and safe as ...
4 years ago (2016-12-20 14:44:57 UTC) #32
alexilin
I have one more thought about the host feature. We actually can use the value ...
4 years ago (2016-12-20 16:19:53 UTC) #35
ahemery
On 2016/12/20 16:19:53, alexilin wrote: > I have one more thought about the host feature. ...
4 years ago (2016-12-21 12:19:12 UTC) #40
Benoit L
https://codereview.chromium.org/2587443002/diff/140001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2587443002/diff/140001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode494 chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc:494: // This browser test override is specifically used to ...
4 years ago (2016-12-21 12:38:26 UTC) #41
Benoit L
+R: clamy. @clamy: Don't review this yet, but I will wait for your OK before ...
4 years ago (2016-12-21 12:40:01 UTC) #43
alexilin
https://codereview.chromium.org/2587443002/diff/140001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2587443002/diff/140001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode494 chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc:494: // This browser test override is specifically used to ...
4 years ago (2016-12-21 13:08:12 UTC) #46
ahemery
https://codereview.chromium.org/2587443002/diff/200001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2587443002/diff/200001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode101 chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc:101: void ReplaceHost(GURL* gurl, const std::string& host) { On 2016/12/21 ...
4 years ago (2016-12-21 15:42:40 UTC) #47
Benoit L
Almost there, only really minor things remaining. After this round, it should be fine for ...
4 years ago (2016-12-22 10:10:12 UTC) #48
Benoit L
A few more high-level things: - Please remove the suppression from testing/buildbot/filters/browser-side-navigation.linux.browser_tests.filter. This patch should ...
4 years ago (2016-12-22 10:16:12 UTC) #49
alexilin
Yeah, we are almost there! https://codereview.chromium.org/2587443002/diff/180001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2587443002/diff/180001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode280 chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc:280: bool match_navigation_id = true; ...
4 years ago (2016-12-22 10:32:29 UTC) #51
ahemery
Corrected all the remaining flaws pointed out, rebased off alexilin@ synchronous cache clearing modification and ...
4 years ago (2016-12-22 12:09:28 UTC) #56
ahemery
https://codereview.chromium.org/2587443002/diff/180001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2587443002/diff/180001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode280 chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc:280: bool match_navigation_id = true; On 2016/12/22 10:32:29, alexilin wrote: ...
4 years ago (2016-12-22 12:09:47 UTC) #57
alexilin
https://codereview.chromium.org/2587443002/diff/280001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2587443002/diff/280001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode468 chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc:468: // The actual replacement cannot be done using GetURL() ...
4 years ago (2016-12-22 14:13:56 UTC) #62
ahemery
https://codereview.chromium.org/2587443002/diff/280001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2587443002/diff/280001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode468 chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc:468: // The actual replacement cannot be done using GetURL() ...
3 years, 12 months ago (2016-12-22 15:01:16 UTC) #63
Benoit L
Thanks, I'm OK with the patch now. @clamy: Can you take a look at the ...
3 years, 12 months ago (2016-12-22 15:31:53 UTC) #66
alexilin
https://codereview.chromium.org/2587443002/diff/300001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2587443002/diff/300001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode684 chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc:684: // process because of cross domain behavior of PlzNavigate. ...
3 years, 12 months ago (2016-12-22 15:40:58 UTC) #67
ahemery
Done
3 years, 12 months ago (2016-12-22 15:50:18 UTC) #70
clamy
Thanks! A few comments and questions below. https://codereview.chromium.org/2587443002/diff/300001/chrome/browser/predictors/resource_prefetch_common.cc File chrome/browser/predictors/resource_prefetch_common.cc (right): https://codereview.chromium.org/2587443002/diff/300001/chrome/browser/predictors/resource_prefetch_common.cc#newcode87 chrome/browser/predictors/resource_prefetch_common.cc:87: main_frame_url(web_contents->GetURL()), Sanity ...
3 years, 12 months ago (2016-12-22 15:52:41 UTC) #71
Benoit L
https://codereview.chromium.org/2587443002/diff/300001/chrome/browser/predictors/resource_prefetch_common.h File chrome/browser/predictors/resource_prefetch_common.h (right): https://codereview.chromium.org/2587443002/diff/300001/chrome/browser/predictors/resource_prefetch_common.h#newcode55 chrome/browser/predictors/resource_prefetch_common.h:55: SessionID::id_type tab_id; On 2016/12/22 15:52:41, clamy wrote: > How ...
3 years, 12 months ago (2016-12-22 16:04:10 UTC) #72
ahemery
https://codereview.chromium.org/2587443002/diff/300001/chrome/browser/predictors/resource_prefetch_common.cc File chrome/browser/predictors/resource_prefetch_common.cc (right): https://codereview.chromium.org/2587443002/diff/300001/chrome/browser/predictors/resource_prefetch_common.cc#newcode87 chrome/browser/predictors/resource_prefetch_common.cc:87: main_frame_url(web_contents->GetURL()), On 2016/12/22 15:52:41, clamy wrote: > Sanity check: ...
3 years, 12 months ago (2016-12-22 17:12:26 UTC) #75
alexilin
LGTM, thanks!
3 years, 12 months ago (2016-12-22 17:16:50 UTC) #78
jam
lgtm for testing/buildbot/filters/browser-side-navigation.linux.browser_tests.filter and chrome/browser/net Thanks!
3 years, 12 months ago (2016-12-22 18:04:38 UTC) #79
Benoit L
On 2016/12/22 18:04:38, jam wrote: > lgtm for > testing/buildbot/filters/browser-side-navigation.linux.browser_tests.filter and > chrome/browser/net > Thanks! ...
3 years, 12 months ago (2016-12-22 20:03:53 UTC) #82
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2587443002/340001
3 years, 12 months ago (2016-12-23 10:29:22 UTC) #84
commit-bot: I haz the power
Committed patchset #15 (id:340001)
3 years, 12 months ago (2016-12-23 10:33:20 UTC) #87
commit-bot: I haz the power
3 years, 12 months ago (2016-12-23 10:35:10 UTC) #89
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/62729f8a7e996d8f6b0451e8bcfcd3a124fd2628
Cr-Commit-Position: refs/heads/master@{#440615}

Powered by Google App Engine
This is Rietveld 408576698