Chromium Code Reviews| Index: ios/chrome/app/main_controller.mm |
| diff --git a/ios/chrome/app/main_controller.mm b/ios/chrome/app/main_controller.mm |
| index 313d56568660ca7e5d95e78859100cfb0ab8aec8..6c01e6739197e424d052d7b0a756f30de5b0491a 100644 |
| --- a/ios/chrome/app/main_controller.mm |
| +++ b/ios/chrome/app/main_controller.mm |
| @@ -387,6 +387,7 @@ enum class StackViewDismissalMode { NONE, NORMAL, INCOGNITO }; |
| // Invokes the sign in flow with the specified authentication operation and |
| // invokes |callback| when finished. |
| - (void)showSigninWithOperation:(AuthenticationOperation)operation |
| + identity:(ChromeIdentity*)identity |
| accessPoint:(signin_metrics::AccessPoint)accessPoint |
| promoAction:(signin_metrics::PromoAction)promoAction |
| callback:(ShowSigninCommandCompletionCallback)callback; |
| @@ -1434,6 +1435,7 @@ enum class StackViewDismissalMode { NONE, NORMAL, INCOGNITO }; |
| [self dismissSigninInteractionController]; |
| } else { |
| [self showSigninWithOperation:command.operation |
| + identity:command.identity |
| accessPoint:command.accessPoint |
| promoAction:command.promoAction |
| callback:command.callback]; |
| @@ -2080,6 +2082,7 @@ enum class StackViewDismissalMode { NONE, NORMAL, INCOGNITO }; |
| } |
| - (void)showSigninWithOperation:(AuthenticationOperation)operation |
| + identity:(ChromeIdentity*)identity |
| accessPoint:(signin_metrics::AccessPoint)accessPoint |
| promoAction:(signin_metrics::PromoAction)promoAction |
| callback:(ShowSigninCommandCompletionCallback)callback { |
| @@ -2116,22 +2119,19 @@ enum class StackViewDismissalMode { NONE, NORMAL, INCOGNITO }; |
| viewController:self.mainViewController]; |
| break; |
| case AUTHENTICATION_OPERATION_SIGNIN: |
| + DCHECK(!identity); |
|
msarda
2017/05/16 13:33:53
Remove this new DCHECK (see comment below).
jlebel
2017/05/16 17:55:08
Done.
|
| [_signinInteractionController |
| signInWithViewController:self.mainViewController |
| identity:nil |
| completion:completion]; |
| break; |
| - case AUTHENTICATION_OPERATION_SIGNIN_PROMO_CONTINUE_AS: { |
| - NSArray* identities = ios::GetChromeBrowserProvider() |
| - ->GetChromeIdentityService() |
| - ->GetAllIdentitiesSortedForDisplay(); |
| - DCHECK(identities.count > 0); |
| + case AUTHENTICATION_OPERATION_SIGNIN_PROMO_CONTINUE_AS: |
|
msarda
2017/05/16 13:33:53
I think we should remove AUTHENTICATION_OPERATION_
jlebel
2017/05/16 17:55:08
Done.
|
| + DCHECK(identity); |
| [_signinInteractionController |
| signInWithViewController:self.mainViewController |
| - identity:identities[0] |
| + identity:identity |
| completion:completion]; |
| break; |
| - } |
| } |
| } |