Commit d2a48375 authored by David Jean's avatar David Jean Committed by Commit Bot

[ios] Fix first run incognito issues for Multi-Windows

When Chrome is in first run state, opening a second window in
incognito, blocks the UI, and doesn't show an ntp.
Fixed by showing ntp on empty tab list (removed out-of-date comment)
Fixed by skipping first run ui on incognito.

Bug: 1113547
Change-Id: I5281acb44ea3575c157988e86b855a404488a9e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2362964Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: David Jean <djean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800934}
parent 3effbc89
......@@ -632,7 +632,8 @@ const char kMultiWindowOpenInNewWindowHistogram[] =
// If this is first run, show the first run UI on top of the new tab.
// If this isn't first run, check if the sign-in promo needs to display.
if (firstRun && !self.mainController.isPresentingFirstRunUI) {
if (firstRun && launchMode != ApplicationMode::INCOGNITO &&
!self.mainController.isPresentingFirstRunUI) {
[self.mainController prepareForFirstRunUI:self.sceneState];
[self showFirstRunUI];
// Do not ever show the 'restore' infobar during first run.
......@@ -1518,10 +1519,7 @@ const char kMultiWindowOpenInNewWindowHistogram[] =
return YES;
}
// If there is a URLLoading activity, avoid opening a new tab as the NTP would
// flash before the target URL is loaded.
return browser->GetWebStateList()->empty() &&
!(browser->GetBrowserState()->IsOffTheRecord());
return browser->GetWebStateList()->empty();
}
#pragma mark - SceneURLLoadingServiceDelegate
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment