Avoid auto switches to standard mode after closing incognito tab
After crrev.com/c/2314557, |mOverviewModeController| can be null depends on the stage of Chrome initialization. ChromeNextTabPolicySupplier is created before the OverviewModeController is instantiated, thus the OverviewModeController in that class is always null. and it always returns the HIERARCHICAL policy and messes up the next tab logic in TabModelImpl. This CL fixes the issue by using the ObservableSupplier to supply the OverviewModeController, so by the time Chrome finishes its initialization the ChromeNextTabPolicySupplier would have a valid OverviewModeController. Bug: 1124227 Change-Id: I5123487ba13cf6797e281df1ab834322dd2ef39d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2404458Reviewed-by:Theresa <twellington@chromium.org> Reviewed-by:
Matthew Jones <mdjones@chromium.org> Commit-Queue: Mei Liang <meiliang@chromium.org> Cr-Commit-Position: refs/heads/master@{#806404}
Showing
Please register or sign in to comment