Commit 9e3f106c authored by bzanotti's avatar bzanotti Committed by Commit bot

Introduce reauthenticateUserWithID:email:callback:

This new ChromeIdentityInteractionManager reauthenticate method is more
flexible and allow the implementation to do some internal cleanup based
on a unique identifier (the email can change).

BUG=623928

Review-Url: https://codereview.chromium.org/2110183006
Cr-Commit-Position: refs/heads/master@{#403206}
parent b44da081
......@@ -45,6 +45,18 @@ typedef void (^SigninCompletionCallback)(ChromeIdentity* identity,
// * |completion| will be called once the operation has finished.
- (void)addAccountWithCompletion:(SigninCompletionCallback)completion;
// Starts the reauthentication operation for a user. Presents user with the
// screen to enter credentials with the email pre-entered.
// Note: Calling this method will fail and the completion will be called with a
// CHROME_IDENTITY_OPERATION_ONGOING error if there is already another add
// account or reauthenticate operation ongoing.
// * |userID| is the unique identifier of the user.
// * |userEmail| will be pre-entered on the presented screen.
// * |completion| will be called once the operation has finished.
- (void)reauthenticateUserWithID:(NSString*)userID
email:(NSString*)userEmail
completion:(SigninCompletionCallback)completion;
// Starts the reauthentication operation for a user. Presents user with the
// screen to enter credentials with the email pre-entered.
// Note: Calling this method will fail and the completion will be called with a
......
......@@ -31,6 +31,13 @@
completion(nil, nil);
}
- (void)reauthenticateUserWithID:(NSString*)userID
email:(NSString*)userEmail
completion:(SigninCompletionCallback)completion {
NOTREACHED() << "Subclasses must override this";
completion(nil, nil);
}
- (void)reauthenticateUserWithEmail:(NSString*)email
completion:(SigninCompletionCallback)completion {
NOTREACHED() << "Subclasses must override this";
......
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