New issue
Advanced search Search tips

Issue 754050 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

Reimplement Prerender as a KeyedService

Project Member Reported by rohitrao@chromium.org, Aug 9 2017

Issue description

The end goal is to move as much code out of BVC and Tab as possible.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/44f20430c1a6976f32c5734d932216018c3f3490

commit 44f20430c1a6976f32c5734d932216018c3f3490
Author: Rohit Rao <rohitrao@google.com>
Date: Thu Aug 10 14:49:54 2017

[ios] Creates PrerenderService.

Adds a new KeyedService to act as the public API for the prerender feature.
Converts BrowserViewController to use the new APIs instead of owning a
PreloadController object directly.

Bug: 754050
Change-Id: I7e154ba4b2a1ac0a69a96392f36959ed48f94db9
Reviewed-on: https://chromium-review.googlesource.com/608872
Commit-Queue: Rohit Rao (ping after 24h) <rohitrao@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Mark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493385}
[add] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/prerender/BUILD.gn
[add] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/prerender/DEPS
[rename] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/prerender/preload_controller.h
[rename] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/prerender/preload_controller.mm
[rename] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/prerender/preload_controller_delegate.h
[rename] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/prerender/preload_controller_unittest.mm
[rename] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/prerender/preload_provider.h
[add] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/prerender/prerender_service.h
[add] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/prerender/prerender_service.mm
[add] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/prerender/prerender_service_factory.h
[add] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/prerender/prerender_service_factory.mm
[add] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/prerender/prerender_service_unittest.mm
[modify] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/test/BUILD.gn
[modify] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/test/perf_test_with_bvc_ios.h
[modify] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/test/perf_test_with_bvc_ios.mm
[modify] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/ui/DEPS
[modify] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/ui/browser_view_controller_dependency_factory.h
[modify] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/ui/browser_view_controller_dependency_factory.mm
[modify] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/ui/browser_view_controller_unittest.mm
[modify] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/ui/omnibox/BUILD.gn
[modify] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm
[modify] https://crrev.com/44f20430c1a6976f32c5734d932216018c3f3490/ios/chrome/test/BUILD.gn

Project Member

Comment 3 by bugdroid1@chromium.org, Sep 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/57c1b83a591417f6b8c0cb1144252a20bb8356f0

commit 57c1b83a591417f6b8c0cb1144252a20bb8356f0
Author: Rohit Rao <rohitrao@google.com>
Date: Thu Sep 21 20:26:22 2017

[ios] Removes the unused PreloadProvider protocol.

BUG=754050
TEST=No visible impact.  Pages should still prerender properly, which can be tested by allowing a URL to inline autocomplete, waiting a few seconds for the prerendered page to load, then pressing Go in the omnibox and verifying that the page appears immediately.

Change-Id: I6af103ce9d5bc4c50f912473bb76c37f0adacbba
Reviewed-on: https://chromium-review.googlesource.com/675835
Reviewed-by: edchin <edchin@chromium.org>
Commit-Queue: Rohit Rao (ping after 24h) <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503547}
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/metrics/tab_usage_recorder.mm
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/prerender/BUILD.gn
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/prerender/preload_controller.h
[delete] https://crrev.com/3a15b1a525a797330e5bdd3eb2f29c8ab52c29e0/ios/chrome/browser/prerender/preload_provider.h
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/prerender/prerender_service.h
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/prerender/prerender_service.mm
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/ui/browser_view_controller_dependency_factory.h
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/ui/browser_view_controller_dependency_factory.mm
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/ui/browser_view_controller_unittest.mm
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/ui/omnibox/BUILD.gn
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/ui/omnibox/location_bar_controller_impl.h
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/ui/omnibox/location_bar_controller_impl.mm
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/ui/omnibox/omnibox_view_ios.h
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/ui/omnibox_perftest.mm
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/ui/toolbar/web_toolbar_controller.h
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/chrome/browser/ui/toolbar/web_toolbar_controller_unittest.mm
[modify] https://crrev.com/57c1b83a591417f6b8c0cb1144252a20bb8356f0/ios/clean/chrome/browser/ui/omnibox/location_bar_coordinator.mm

Cc: sdefresne@chromium.org
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/33fa96946ca7a52588978af92ff878b2b872449e

commit 33fa96946ca7a52588978af92ff878b2b872449e
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Thu Oct 19 20:34:44 2017

Remove unused protocol PrerenderDelegate.

Bug: 754050
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I455f44efdbc02214a51d182460baeb1ab224383d
Reviewed-on: https://chromium-review.googlesource.com/728334
Reviewed-by: Rohit Rao (ping after 24h) <rohitrao@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510192}
[modify] https://crrev.com/33fa96946ca7a52588978af92ff878b2b872449e/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/33fa96946ca7a52588978af92ff878b2b872449e/ios/chrome/browser/ui/BUILD.gn
[delete] https://crrev.com/de426dcb636e12f2a90ea783cd8f42476473488e/ios/chrome/browser/ui/prerender_delegate.h

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f5d2d957af78d8f9cc025e7301d12409d2f48cad

commit f5d2d957af78d8f9cc025e7301d12409d2f48cad
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Tue Nov 14 11:15:31 2017

Move logic for pre-render to PreloadController.

Remove the -isPrerenderTab public property from Tab (keep it as a
helper internal method as Tab is still responsible for most of the
behaviour of the WebState during pre-rendering after this CL).

A Tab is considered as pre-rendering if the corresponding WebState
is owned by PreloadController. Currently most of the logic is still
in Tab class itself, but once most of the code has been moved to
tab helpers, a pre-rendering tab will only have a subset of the tab
helpers, and the logic of cancelling the pre-rendering will move to
PreloadController.

Add a boolean to track when a pre-rendered Tab is converted to a
real Tab in BrowserViewController (some of the callbacks invoked
when the WebState is inserted in the WebStateList needs to know
that the WebState was pre-rendering but most of the code want to
be able to assert that no pre-rendering Tab is in TabModel).

With this CL, TabModel does not contain any pre-rendering Tab at
any point in time (this becomes a new invariant of the class).

Bug: 754050
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I8b5eeec8edc7911481ea28953dcc6a338ccfe87a
Reviewed-on: https://chromium-review.googlesource.com/732263
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Rohit Rao (ping after 24h) <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516265}
[modify] https://crrev.com/f5d2d957af78d8f9cc025e7301d12409d2f48cad/ios/chrome/browser/geolocation/omnibox_geolocation_controller.mm
[modify] https://crrev.com/f5d2d957af78d8f9cc025e7301d12409d2f48cad/ios/chrome/browser/prerender/BUILD.gn
[modify] https://crrev.com/f5d2d957af78d8f9cc025e7301d12409d2f48cad/ios/chrome/browser/prerender/preload_controller.h
[modify] https://crrev.com/f5d2d957af78d8f9cc025e7301d12409d2f48cad/ios/chrome/browser/prerender/preload_controller.mm
[modify] https://crrev.com/f5d2d957af78d8f9cc025e7301d12409d2f48cad/ios/chrome/browser/prerender/prerender_service.mm
[modify] https://crrev.com/f5d2d957af78d8f9cc025e7301d12409d2f48cad/ios/chrome/browser/tabs/tab.h
[modify] https://crrev.com/f5d2d957af78d8f9cc025e7301d12409d2f48cad/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/f5d2d957af78d8f9cc025e7301d12409d2f48cad/ios/chrome/browser/ui/browser_view_controller.mm

Sign in to add a comment