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

Side by Side Diff: ios/public/provider/chrome/browser/signin/fake_chrome_identity_interaction_manager.mm

Issue 2442563002: Access SigninErrorProvider through ChromeBrowserProvider. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/signin/signin_util.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #import "ios/public/provider/chrome/browser/signin/fake_chrome_identity_interact ion_manager.h" 5 #import "ios/public/provider/chrome/browser/signin/fake_chrome_identity_interact ion_manager.h"
6 6
7 #include "base/mac/scoped_block.h" 7 #include "base/mac/scoped_block.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #import "ios/public/provider/chrome/browser/chrome_browser_provider.h"
9 #import "ios/public/provider/chrome/browser/signin/fake_chrome_identity_service. h" 10 #import "ios/public/provider/chrome/browser/signin/fake_chrome_identity_service. h"
10 #include "ios/public/provider/chrome/browser/signin/signin_error_provider.h" 11 #include "ios/public/provider/chrome/browser/signin/signin_error_provider.h"
11 12
12 @interface FakeAddAccountViewController : UIViewController { 13 @interface FakeAddAccountViewController : UIViewController {
13 FakeChromeIdentityInteractionManager* _manager; // Weak. 14 FakeChromeIdentityInteractionManager* _manager; // Weak.
14 base::scoped_nsobject<UIButton> _cancelButton; 15 base::scoped_nsobject<UIButton> _cancelButton;
15 base::scoped_nsobject<UIButton> _signInButton; 16 base::scoped_nsobject<UIButton> _signInButton;
16 } 17 }
17 @end 18 @end
18 19
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 if (_completionCallback) { 155 if (_completionCallback) {
155 // Ensure self is not destroyed in the callback. 156 // Ensure self is not destroyed in the callback.
156 base::scoped_nsobject<FakeChromeIdentityInteractionManager> strongSelf( 157 base::scoped_nsobject<FakeChromeIdentityInteractionManager> strongSelf(
157 [self retain]); 158 [self retain]);
158 _completionCallback.get()(error ? nil : _fakeIdentity, error); 159 _completionCallback.get()(error ? nil : _fakeIdentity, error);
159 _completionCallback.reset(); 160 _completionCallback.reset();
160 } 161 }
161 } 162 }
162 163
163 - (NSError*)canceledError { 164 - (NSError*)canceledError {
164 ios::SigninErrorProvider* provider = ios::GetSigninErrorProvider(); 165 ios::SigninErrorProvider* provider =
166 ios::GetChromeBrowserProvider()->GetSigninErrorProvider();
165 return [NSError errorWithDomain:provider->GetSigninErrorDomain() 167 return [NSError errorWithDomain:provider->GetSigninErrorDomain()
166 code:provider->GetCode(ios::SigninError::CANCELED) 168 code:provider->GetCode(ios::SigninError::CANCELED)
167 userInfo:nil]; 169 userInfo:nil];
168 } 170 }
169 171
170 @end 172 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/signin/signin_util.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698