New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 817024 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Remove WebContentsObserver::DidStartNavigationToPendingEntry

Project Member Reported by a...@chromium.org, Feb 27 2018

Issue description

It is obsolete with PlzNavigate.
 

Comment 1 by clamy@chromium.org, Feb 28 2018

I'm not sure that's the case. Apparently a few observers need to be synchronously notified when starting a browser-initiated navigations. That's only true with DidStartNavigation when there is no BeforeUnload event (since DidStartNavigation happens after BeforeUnload). We should first investigate whether a synchronous notification of browser navigation start is still needed and still provide one if that's the case - though it can be renamed.

Comment 2 by a...@chromium.org, Feb 28 2018

If that's true, we should definitely change the WCO comment on the callback, which clearly says it's obsolete with Plz.

Comment 3 by clamy@chromium.org, Feb 28 2018

Yes. We thought it was obsolete, the changed when DidStartNavigation happens, and found that some caller need synchronous notification.

Comment 4 by a...@chromium.org, Feb 28 2018

I ran a CL with DidStartNavigationToPendingEntry's removal in https://crrev.com/c/939749 , though I didn't deeply investigate the failures that arose. Here's the summary.

* android_webview/browser/icon_helper.h/cc. It's used here to clear a flag when there's a reload BYPASSING_CACHE. Probably convertible to DidStartNavigation.
* chrome/browser/ui/browser_instant_controller_unittest.cc A unittest. Needs investigation.
* chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc Asks for the override to be removed when PlzNavigate is turned on. Easy.
* chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc Asks for the override to be removed when PlzNavigate is turned on. Easy.
* content/browser/frame_host/navigation_controller_impl_unittest.cc A unittest. Needs investigation.
* content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc A unittest. Needs investigation.

That's it. One place that can probably easily be converted, two places that request removal when PlzNavigate is turned on, and three unit tests. From my experience, I distrust unit test failures in navigation code work.

Perhaps we still need DidStartNavigationToPendingEntry, but those existing users don't (yet) seem convincing. We should look.

Sign in to add a comment