Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: ios/chrome/app/main_controller.mm

Issue 2880333003: Adding ChromeIdentity in ShowSigninCommand. (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..fbfef1fb0822c04fd90b10a2c415d9160624543e 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 {
@@ -2118,20 +2121,9 @@ enum class StackViewDismissalMode { NONE, NORMAL, INCOGNITO };
case AUTHENTICATION_OPERATION_SIGNIN:
[_signinInteractionController
signInWithViewController:self.mainViewController
- identity:nil
+ identity:identity
completion:completion];
break;
- case AUTHENTICATION_OPERATION_SIGNIN_PROMO_CONTINUE_AS: {
- NSArray* identities = ios::GetChromeBrowserProvider()
- ->GetChromeIdentityService()
- ->GetAllIdentitiesSortedForDisplay();
- DCHECK(identities.count > 0);
- [_signinInteractionController
- signInWithViewController:self.mainViewController
- identity:identities[0]
- completion:completion];
- break;
- }
}
}

Powered by Google App Engine
This is Rietveld 408576698