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

Issue 1767243002: Update prerender policy for custom tabs (Closed)

Created:
4 years, 9 months ago by Yusuf
Modified:
4 years, 8 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update prerender policy for custom tabs - Explicitly early return if the prerender privacy setting is set to off - If the setting is on then prerendering on mobile is off by default - Add calls and session params to override the above default if needed BUG=592635 Committed: https://crrev.com/425b45e3bcf31dff702e3f59fc8bc180977f5730 Cr-Commit-Position: refs/heads/master@{#382875}

Patch Set 1 #

Patch Set 2 : Added prerender_manager specific logic #

Patch Set 3 : fix indentation #

Total comments: 8

Patch Set 4 : Dan's comments #

Total comments: 12

Patch Set 5 : Renaming nits #

Total comments: 12

Patch Set 6 : Rename with "cellular" and add explicit AddPrerender call #

Total comments: 2

Patch Set 7 : Check trybot #

Patch Set 8 : Rebased #

Patch Set 9 : Add second test #

Patch Set 10 : Update tests #

Patch Set 11 : Remove DisableForTest #

Patch Set 12 : Enable prerender before tests #

Patch Set 13 : Added tests and updated GetPredictionStatus calls #

Patch Set 14 : Updated comments #

Total comments: 7

Patch Set 15 : pasko@ nits #

Total comments: 16

Patch Set 16 : mmenke@'s comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -30 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/WarmupManager.java View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java View 1 2 3 4 5 2 chunks +18 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java View 1 2 3 4 5 6 chunks +13 lines, -5 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/prerender/ExternalPrerenderHandler.java View 1 2 3 4 5 3 chunks +10 lines, -5 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/prerender/ExternalPrerenderRequestTest.java View 1 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/prerender/external_prerender_handler_android.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/prerender/external_prerender_handler_android.cc View 1 2 3 4 5 3 chunks +20 lines, -8 lines 0 comments Download
M chrome/browser/prerender/prerender_histograms.cc View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +36 lines, -3 lines 0 comments Download
M chrome/browser/prerender/prerender_origin.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_origin.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +66 lines, -0 lines 0 comments Download
M chrome/test/android/javatests/src/org/chromium/chrome/test/util/PrerenderTestHelper.java View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 57 (16 generated)
Yusuf
4 years, 9 months ago (2016-03-07 22:06:59 UTC) #2
Benoit L
On 2016/03/07 22:06:59, Yusuf wrote: Should we just follow the current policy of Chrome in ...
4 years, 9 months ago (2016-03-08 13:03:29 UTC) #3
pasko
On 2016/03/08 13:03:29, Benoit L wrote: > On 2016/03/07 22:06:59, Yusuf wrote: > > Should ...
4 years, 9 months ago (2016-03-08 14:28:18 UTC) #4
Benoit L
On 2016/03/08 14:28:18, pasko wrote: > On 2016/03/08 13:03:29, Benoit L wrote: > > On ...
4 years, 9 months ago (2016-03-08 18:37:26 UTC) #5
pasko
In chrome/browser/net/prediction_options.cc the function CanPrefetchAndPrerender() would disallow prerendering even if the session allows it.
4 years, 9 months ago (2016-03-08 18:55:22 UTC) #6
Yusuf
Thanks Egor! Added the bits about prerender_manager mmenke@ for prerender/ dfalcantara for plumbing in ExternalPrerenderHandler ...
4 years, 9 months ago (2016-03-09 22:23:10 UTC) #8
gone
https://chromiumcodereview.appspot.com/1767243002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java File chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java (right): https://chromiumcodereview.appspot.com/1767243002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java#newcode290 chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java:290: if (params != null) params.mShouldPrerenderOnMobile = prerender; should setIgnoreFragmentsForSession ...
4 years, 9 months ago (2016-03-09 23:02:14 UTC) #9
Yusuf
https://chromiumcodereview.appspot.com/1767243002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java File chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java (right): https://chromiumcodereview.appspot.com/1767243002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java#newcode290 chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java:290: if (params != null) params.mShouldPrerenderOnMobile = prerender; On 2016/03/09 ...
4 years, 9 months ago (2016-03-09 23:22:49 UTC) #10
gone
lgtm
4 years, 9 months ago (2016-03-09 23:24:33 UTC) #11
Benoit L
Thanks for that! Only minor nits, and a request to keep the code consistent. Sorry ...
4 years, 9 months ago (2016-03-10 13:58:30 UTC) #12
pasko
overall looking good, agreed to lizeb@ on his main suggestions https://codereview.chromium.org/1767243002/diff/60001/chrome/browser/prerender/prerender_manager.cc File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/1767243002/diff/60001/chrome/browser/prerender/prerender_manager.cc#newcode1293 ...
4 years, 9 months ago (2016-03-10 14:21:37 UTC) #13
Yusuf
https://codereview.chromium.org/1767243002/diff/60001/chrome/browser/prerender/external_prerender_handler_android.cc File chrome/browser/prerender/external_prerender_handler_android.cc (right): https://codereview.chromium.org/1767243002/diff/60001/chrome/browser/prerender/external_prerender_handler_android.cc#newcode61 chrome/browser/prerender/external_prerender_handler_android.cc:61: bool prerender_on_mobile) { On 2016/03/10 13:58:30, Benoit L wrote: ...
4 years, 9 months ago (2016-03-10 18:55:54 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1767243002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1767243002/80001
4 years, 9 months ago (2016-03-10 19:02:55 UTC) #16
pasko
lgtm, thank you! https://codereview.chromium.org/1767243002/diff/80001/chrome/browser/prerender/prerender_origin.cc File chrome/browser/prerender/prerender_origin.cc (right): https://codereview.chromium.org/1767243002/diff/80001/chrome/browser/prerender/prerender_origin.cc#newcode29 chrome/browser/prerender/prerender_origin.cc:29: "External Request Forced Custom Tabs", nit: ...
4 years, 9 months ago (2016-03-10 19:19:25 UTC) #17
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/179488)
4 years, 9 months ago (2016-03-10 19:42:33 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1767243002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1767243002/80001
4 years, 9 months ago (2016-03-11 11:01:32 UTC) #21
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/195362)
4 years, 9 months ago (2016-03-11 12:09:22 UTC) #23
Yusuf
ping
4 years, 9 months ago (2016-03-14 16:56:34 UTC) #24
mmenke
On 2016/03/14 16:56:34, Yusuf wrote: > ping Sorry, forgot about this. I'll try to get ...
4 years, 9 months ago (2016-03-14 16:58:14 UTC) #25
mmenke
[+cbentzel]: Any thoughts on whether we should push back on prerendering on cellular? It doesn't ...
4 years, 9 months ago (2016-03-14 20:38:01 UTC) #27
mmenke
On 2016/03/14 20:38:01, mmenke wrote: > [+cbentzel]: Any thoughts on whether we should push back ...
4 years, 9 months ago (2016-03-14 20:38:19 UTC) #28
cbentzel
Currently decided on policy is to allow it in this CCT case. I can fill ...
4 years, 9 months ago (2016-03-14 21:03:26 UTC) #29
Yusuf
https://codereview.chromium.org/1767243002/diff/80001/chrome/browser/prerender/prerender_manager.cc File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/1767243002/diff/80001/chrome/browser/prerender/prerender_manager.cc#newcode301 chrome/browser/prerender/prerender_manager.cc:301: bool prerender_on_mobile) { On 2016/03/14 20:38:01, mmenke wrote: > ...
4 years, 9 months ago (2016-03-14 23:08:20 UTC) #30
mmenke
https://codereview.chromium.org/1767243002/diff/80001/chrome/browser/prerender/prerender_manager.cc File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/1767243002/diff/80001/chrome/browser/prerender/prerender_manager.cc#newcode794 chrome/browser/prerender/prerender_manager.cc:794: GetPredictionStatus() == NetworkPredictionStatus::ENABLED); On 2016/03/14 23:08:20, Yusuf wrote: > ...
4 years, 9 months ago (2016-03-15 14:34:21 UTC) #31
mmenke
Also, we should have a test for this. See PrerenderManagerTest.LinkRelNotAllowedWhenDisabled for an example (Though you ...
4 years, 9 months ago (2016-03-15 21:21:59 UTC) #32
Yusuf
Added there tests. PTAL. https://codereview.chromium.org/1767243002/diff/80001/chrome/browser/prerender/prerender_manager.cc File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/1767243002/diff/80001/chrome/browser/prerender/prerender_manager.cc#newcode794 chrome/browser/prerender/prerender_manager.cc:794: GetPredictionStatus() == NetworkPredictionStatus::ENABLED); On 2016/03/15 ...
4 years, 9 months ago (2016-03-20 06:48:29 UTC) #33
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1767243002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1767243002/260001
4 years, 9 months ago (2016-03-20 06:48:45 UTC) #35
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-20 08:04:49 UTC) #37
pasko
still lgtm https://codereview.chromium.org/1767243002/diff/260001/chrome/browser/prerender/prerender_unittest.cc File chrome/browser/prerender/prerender_unittest.cc (right): https://codereview.chromium.org/1767243002/diff/260001/chrome/browser/prerender/prerender_unittest.cc#newcode231 chrome/browser/prerender/prerender_unittest.cc:231: nit: don't we use only one vertical ...
4 years, 9 months ago (2016-03-21 12:00:58 UTC) #38
Yusuf
Thanks Egor! https://codereview.chromium.org/1767243002/diff/260001/chrome/browser/prerender/prerender_unittest.cc File chrome/browser/prerender/prerender_unittest.cc (right): https://codereview.chromium.org/1767243002/diff/260001/chrome/browser/prerender/prerender_unittest.cc#newcode231 chrome/browser/prerender/prerender_unittest.cc:231: On 2016/03/21 12:00:58, pasko wrote: > nit: ...
4 years, 9 months ago (2016-03-21 16:59:57 UTC) #39
mmenke
LGTM, modulo comments. Sorry about slowness on this review. https://codereview.chromium.org/1767243002/diff/280001/chrome/browser/prerender/prerender_unittest.cc File chrome/browser/prerender/prerender_unittest.cc (right): https://codereview.chromium.org/1767243002/diff/280001/chrome/browser/prerender/prerender_unittest.cc#newcode1082 chrome/browser/prerender/prerender_unittest.cc:1082: ...
4 years, 9 months ago (2016-03-22 15:29:29 UTC) #40
Yusuf
https://codereview.chromium.org/1767243002/diff/280001/chrome/browser/prerender/prerender_unittest.cc File chrome/browser/prerender/prerender_unittest.cc (right): https://codereview.chromium.org/1767243002/diff/280001/chrome/browser/prerender/prerender_unittest.cc#newcode1082 chrome/browser/prerender/prerender_unittest.cc:1082: GURL("http://www.example.com"))); On 2016/03/22 15:29:29, mmenke wrote: > nit: Fits ...
4 years, 9 months ago (2016-03-22 19:21:11 UTC) #41
Yusuf
holte@ for histograms change
4 years, 9 months ago (2016-03-22 19:22:37 UTC) #43
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1767243002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1767243002/300001
4 years, 9 months ago (2016-03-22 19:23:22 UTC) #45
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-22 20:44:00 UTC) #47
Yusuf
rkaplow@ for histograms.xml
4 years, 9 months ago (2016-03-23 17:41:02 UTC) #49
rkaplow
lgtm
4 years, 9 months ago (2016-03-23 17:46:57 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1767243002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1767243002/300001
4 years, 9 months ago (2016-03-23 17:47:42 UTC) #53
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 9 months ago (2016-03-23 17:53:54 UTC) #54
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/425b45e3bcf31dff702e3f59fc8bc180977f5730 Cr-Commit-Position: refs/heads/master@{#382875}
4 years, 9 months ago (2016-03-23 17:56:22 UTC) #56
pasko
4 years, 8 months ago (2016-03-31 15:30:44 UTC) #57
Message was sent while issue was closed.
https://codereview.chromium.org/1767243002/diff/260001/chrome/browser/prerend...
File chrome/browser/prerender/prerender_unittest.cc (right):

https://codereview.chromium.org/1767243002/diff/260001/chrome/browser/prerend...
chrome/browser/prerender/prerender_unittest.cc:1077:
TEST_F(PrerenderTest,PrerenderNotAllowedOnCellular) {
On 2016/03/21 16:59:57, Yusuf wrote:
> On 2016/03/21 12:00:58, pasko wrote:
> > nit: s/,/, /
> > same below
> 
> Done.

Thank you. I just noticed it was not done for tests below. I think I should have
explicitly said something "also below"...

Powered by Google App Engine
This is Rietveld 408576698