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

Unified Diff: ios/chrome/browser/ui/commands/show_signin_command.h

Issue 2880333003: Adding ChromeIdentity in ShowSigninCommand. (Closed)
Patch Set: Fixing the build 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/browser/ui/commands/show_signin_command.h
diff --git a/ios/chrome/browser/ui/commands/show_signin_command.h b/ios/chrome/browser/ui/commands/show_signin_command.h
index ffae53f40da60752d62564bf085b3e1236abfa24..42a89624fa85a13e37b0d5d035c343eca9e8c675 100644
--- a/ios/chrome/browser/ui/commands/show_signin_command.h
+++ b/ios/chrome/browser/ui/commands/show_signin_command.h
@@ -10,6 +10,8 @@
#include "components/signin/core/browser/signin_metrics.h"
#include "ios/chrome/browser/ui/commands/generic_chrome_command.h"
+@class ChromeIdentity;
+
typedef void (^ShowSigninCommandCompletionCallback)(BOOL succeeded);
enum AuthenticationOperation {
@@ -24,10 +26,6 @@ enum AuthenticationOperation {
// Operation to start a sign-in operation. The user is presented with the
// SSOAuth sign in page (SSOAuth account picker or SSOAuth sign-in web page).
AUTHENTICATION_OPERATION_SIGNIN,
-
- // Operation to start a sign-in operation based on the first known identity.
- // The users are presented with the sync confirmation screen.
- AUTHENTICATION_OPERATION_SIGNIN_PROMO_CONTINUE_AS,
};
// A command to perform a sign in operation.
@@ -39,12 +37,13 @@ enum AuthenticationOperation {
// Initializes a command to perform the specified operation with a
// SigninInteractionController and invoke a possibly-nil callback when finished.
- (instancetype)initWithOperation:(AuthenticationOperation)operation
+ identity:(ChromeIdentity*)identity
accessPoint:(signin_metrics::AccessPoint)accessPoint
promoAction:(signin_metrics::PromoAction)promoAction
callback:(ShowSigninCommandCompletionCallback)callback
NS_DESIGNATED_INITIALIZER;
-// Initializes a ShowSigninCommand with a nil callback.
+// Initializes a ShowSigninCommand with |identity| and |callback| set to nil.
- (instancetype)initWithOperation:(AuthenticationOperation)operation
accessPoint:(signin_metrics::AccessPoint)accessPoint
promoAction:(signin_metrics::PromoAction)promoAction;
@@ -61,6 +60,13 @@ enum AuthenticationOperation {
// The operation to perform during the sign-in flow.
@property(nonatomic, readonly) AuthenticationOperation operation;
+// Chrome identity is only used for the AUTHENTICATION_OPERATION_SIGNIN
+// operation (should be nil otherwise). If the identity is non-nil, the
+// interaction view controller logins using this identity. If the identity is
+// nil, the interaction view controller asks the user to choose an identity or
+// to add a new one.
+@property(nonatomic, readonly) ChromeIdentity* identity;
+
// The access point of this authentication operation.
@property(nonatomic, readonly) signin_metrics::AccessPoint accessPoint;

Powered by Google App Engine
This is Rietveld 408576698