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

Unified Diff: ios/chrome/browser/ui/authentication/signin_interaction_controller.mm

Issue 2920853006: Removes usage of signin APIs that return scoped_nsobjects. (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/browser/ui/authentication/signin_interaction_controller.mm
diff --git a/ios/chrome/browser/ui/authentication/signin_interaction_controller.mm b/ios/chrome/browser/ui/authentication/signin_interaction_controller.mm
index 1f693f817abf71fb9e411a7811ed9a8ef4add697..4da34cfa13d2d656409cf3b3e8cd142988f97cf8 100644
--- a/ios/chrome/browser/ui/authentication/signin_interaction_controller.mm
+++ b/ios/chrome/browser/ui/authentication/signin_interaction_controller.mm
@@ -109,9 +109,9 @@ using signin_ui::CompletionCallback;
DCHECK(!signinViewController_);
[self showSigninViewControllerWithIdentity:nil identityAdded:NO];
} else {
- identityInteractionManager_ =
- identityService->NewChromeIdentityInteractionManager(browserState_,
- self);
+ identityInteractionManager_.reset(
+ identityService->CreateChromeIdentityInteractionManager(browserState_,
+ self));
if (!identityInteractionManager_) {
// Abort sign-in if the ChromeIdentityInteractionManager returned is
// nil (this can happen when the iOS internal provider is not used).
@@ -154,10 +154,10 @@ using signin_ui::CompletionCallback;
}
DCHECK(!emailToReauthenticate.empty());
DCHECK(!idToReauthenticate.empty());
- identityInteractionManager_ =
+ identityInteractionManager_.reset(
ios::GetChromeBrowserProvider()
->GetChromeIdentityService()
- ->NewChromeIdentityInteractionManager(browserState_, self);
+ ->CreateChromeIdentityInteractionManager(browserState_, self));
base::WeakNSObject<SigninInteractionController> weakSelf(self);
[identityInteractionManager_
reauthenticateUserWithID:base::SysUTF8ToNSString(idToReauthenticate)
@@ -173,10 +173,10 @@ using signin_ui::CompletionCallback;
- (void)addAccountWithCompletion:(CompletionCallback)completion
viewController:(UIViewController*)viewController {
completionCallback_.reset(completion, base::scoped_policy::RETAIN);
- identityInteractionManager_ =
+ identityInteractionManager_.reset(
ios::GetChromeBrowserProvider()
->GetChromeIdentityService()
- ->NewChromeIdentityInteractionManager(browserState_, self);
+ ->CreateChromeIdentityInteractionManager(browserState_, self));
base::WeakNSObject<SigninInteractionController> weakSelf(self);
[identityInteractionManager_
addAccountWithCompletion:^(ChromeIdentity* identity, NSError* error) {

Powered by Google App Engine
This is Rietveld 408576698