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

Issue 651205 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug


Participants' hotlists:
ExternalNavigationIssues


Sign in to add a comment

Investigate tab use in ExternalNavigationDelegate

Project Member Reported by mariakho...@chromium.org, Sep 28 2016

Issue description

We pass a tab object into the constructor, but also pass one through params to the handler and then over to the delegate.

Check whether they are always the same and consolidate, if so.

 
Cc: mariakho...@chromium.org
Owner: thildebr@chromium.org
Basically there's a Tab object being passed into ExternalNavigationDelegateImpl constructor. And then there's also lots of methods that pass Tab object from ExternalNavigationHandler. I suspect the tab is always the same and we should just stop passing it all over the place and use the one in the constructor.

The key tricky case to check here is: Open a custom tab, then convert the custom tab to Chrome tab (menu -> open in Chrome). See if anything interesting happens to the tab objects.
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 7 2018

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

commit 1861d485ae1db9eb4930bbcdf75d6ca292ca0aec
Author: Troy Hildebrandt <thildebr@chromium.org>
Date: Wed Mar 07 15:59:52 2018

Remove unnecessary Tab params from ExternalNavHandler(Delegate).

The ExternalNavigationHandlerDelegateImpl gets passed a Tab as a
parameter when we create an ExternalNavigationHandler, and this
doesn't change for its lifespan. The Tab in question is passed in from
the call to Tab#attach, which creates a brand new
InterceptNavigationDelegate which in turn ends up creating the
ExternalNavigationHandlerDelegate.

Bug:  651205 
Change-Id: Iba4cfb154c5374ff931b35211246975f9cdd7892
Reviewed-on: https://chromium-review.googlesource.com/952274
Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org>
Commit-Queue: Troy Hildebrandt <thildebr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541445}
[modify] https://crrev.com/1861d485ae1db9eb4930bbcdf75d6ca292ca0aec/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegate.java
[modify] https://crrev.com/1861d485ae1db9eb4930bbcdf75d6ca292ca0aec/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImpl.java
[modify] https://crrev.com/1861d485ae1db9eb4930bbcdf75d6ca292ca0aec/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
[modify] https://crrev.com/1861d485ae1db9eb4930bbcdf75d6ca292ca0aec/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java

Status: Fixed (was: Assigned)

Sign in to add a comment