Commit 4bd6ec7a authored by Jérôme Lebel's avatar Jérôme Lebel Committed by Commit Bot

[iOS] Fixing DCHECK for -UnifiedConsentCoordinator.selectedIdentity

The selected identity in UnifiedConsentCoordinator should not be set to
nil. This can happen when starting FRE with identity already known by
the device, or when opening the sign-in view "Choose Another Account".

Bug revealed by:
crrev.com/c/2139666

Bug: 971989
Change-Id: I0ec051b195246d74c408de5d7d9f375c33b556ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144134
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Commit-Queue: Nohemi Fernandez <fernandex@chromium.org>
Auto-Submit: Jérôme Lebel <jlebel@chromium.org>
Reviewed-by: default avatarNohemi Fernandez <fernandex@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757905}
parent b00c9c3d
...@@ -124,7 +124,9 @@ const CGFloat kFadeOutAnimationDuration = 0.16f; ...@@ -124,7 +124,9 @@ const CGFloat kFadeOutAnimationDuration = 0.16f;
self.unifiedConsentCoordinator.delegate = self; self.unifiedConsentCoordinator.delegate = self;
// Set UnifiedConsentCoordinator properties. // Set UnifiedConsentCoordinator properties.
self.unifiedConsentCoordinator.selectedIdentity = self.defaultIdentity; if (self.defaultIdentity) {
self.unifiedConsentCoordinator.selectedIdentity = self.defaultIdentity;
}
self.unifiedConsentCoordinator.autoOpenIdentityPicker = self.unifiedConsentCoordinator.autoOpenIdentityPicker =
self.logger.promoAction == PromoAction::PROMO_ACTION_NOT_DEFAULT; self.logger.promoAction == PromoAction::PROMO_ACTION_NOT_DEFAULT;
......
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