Commit dccba5a5 authored by Nohemi Fernandez's avatar Nohemi Fernandez Committed by Chromium LUCI CQ

[iOS] Ensure that UserSigninCoordinator properties are dismissed.

Currently, Chrome does not properly dismiss all of its views when the
sign-in flow has been interrupted. Add a DCHECK to ensure all flows
lead to proper dismissal.

Bug: 1115997
Change-Id: I86151297b16c0a791b2e4b4b4671cf4c0dcbfb81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2617921
Commit-Queue: Nohemi Fernandez <fernandex@chromium.org>
Reviewed-by: default avatarJérôme Lebel <jlebel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841462}
parent 3ab83c88
......@@ -214,6 +214,15 @@ const CGFloat kFadeOutAnimationDuration = 0.16f;
[self interruptUserSigninUIWithAction:action completion:completion];
}
- (void)stop {
DCHECK(!self.viewController);
DCHECK(!self.mediator);
DCHECK(!self.unifiedConsentCoordinator);
DCHECK(!self.addAccountSigninCoordinator);
DCHECK(!self.advancedSettingsSigninCoordinator);
[super stop];
}
#pragma mark - UnifiedConsentCoordinatorDelegate
- (void)unifiedConsentCoordinatorDidTapSettingsLink:
......@@ -505,10 +514,10 @@ const CGFloat kFadeOutAnimationDuration = 0.16f;
__weak UserSigninCoordinator* weakSelf = self;
ProceduralBlock runCompletionCallback = ^{
[weakSelf
runCompletionCallbackWithSigninResult:SigninCoordinatorResultInterrupted
identity:self.unifiedConsentCoordinator
.selectedIdentity
showAdvancedSettingsSignin:NO];
viewControllerDismissedWithResult:SigninCoordinatorResultInterrupted
identity:weakSelf.unifiedConsentCoordinator
.selectedIdentity
settingsLinkWasTapped:NO];
if (completion) {
completion();
}
......
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