| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ios/chrome/browser/ui/authentication/chrome_signin_view_controller.h" | 5 #include "ios/chrome/browser/ui/authentication/chrome_signin_view_controller.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 [_authenticationFlow startSignInWithCompletion:^(BOOL success) { | 351 [_authenticationFlow startSignInWithCompletion:^(BOOL success) { |
| 352 [weakSelf onAccountSigninCompletion:success]; | 352 [weakSelf onAccountSigninCompletion:success]; |
| 353 }]; | 353 }]; |
| 354 } | 354 } |
| 355 | 355 |
| 356 - (void)openAuthenticationDialogAddIdentity { | 356 - (void)openAuthenticationDialogAddIdentity { |
| 357 DCHECK(!_interactionManager); | 357 DCHECK(!_interactionManager); |
| 358 _interactionManager = | 358 _interactionManager = |
| 359 ios::GetChromeBrowserProvider() | 359 ios::GetChromeBrowserProvider() |
| 360 ->GetChromeIdentityService() | 360 ->GetChromeIdentityService() |
| 361 ->CreateChromeIdentityInteractionManager(_browserState, self); | 361 ->NewChromeIdentityInteractionManager(_browserState, self); |
| 362 __weak ChromeSigninViewController* weakSelf = self; | 362 __weak ChromeSigninViewController* weakSelf = self; |
| 363 SigninCompletionCallback completion = | 363 SigninCompletionCallback completion = |
| 364 ^(ChromeIdentity* identity, NSError* error) { | 364 ^(ChromeIdentity* identity, NSError* error) { |
| 365 ChromeSigninViewController* strongSelf = weakSelf; | 365 ChromeSigninViewController* strongSelf = weakSelf; |
| 366 if (!strongSelf || !strongSelf->_interactionManager) | 366 if (!strongSelf || !strongSelf->_interactionManager) |
| 367 return; | 367 return; |
| 368 // The ChromeIdentityInteractionManager is not used anymore at this | 368 // The ChromeIdentityInteractionManager is not used anymore at this |
| 369 // point. | 369 // point. |
| 370 strongSelf->_interactionManager = nil; | 370 strongSelf->_interactionManager = nil; |
| 371 | 371 |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 } | 935 } |
| 936 _hasConfirmationScreenReachedBottom = YES; | 936 _hasConfirmationScreenReachedBottom = YES; |
| 937 [self setPrimaryButtonStyling:_primaryButton]; | 937 [self setPrimaryButtonStyling:_primaryButton]; |
| 938 [_primaryButton setTitle:[self acceptSigninButtonTitle] | 938 [_primaryButton setTitle:[self acceptSigninButtonTitle] |
| 939 forState:UIControlStateNormal]; | 939 forState:UIControlStateNormal]; |
| 940 [_primaryButton setImage:nil forState:UIControlStateNormal]; | 940 [_primaryButton setImage:nil forState:UIControlStateNormal]; |
| 941 [self.view setNeedsLayout]; | 941 [self.view setNeedsLayout]; |
| 942 } | 942 } |
| 943 | 943 |
| 944 @end | 944 @end |
| OLD | NEW |