OLD | NEW |
---|---|
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/chrome_identity_interaction_m anager.h" | 5 #import "ios/public/provider/chrome/browser/signin/chrome_identity_interaction_m anager.h" |
6 | 6 |
7 #import "base/ios/weak_nsobject.h" | |
8 #include "base/logging.h" | 7 #include "base/logging.h" |
9 | 8 |
9 #if !defined(__has_feature) || !__has_feature(objc_arc) | |
10 #error "This file requires ARC support." | |
11 #endif | |
12 | |
10 @interface ChromeIdentityInteractionManager () { | 13 @interface ChromeIdentityInteractionManager () { |
11 base::WeakNSProtocol<id<ChromeIdentityInteractionManagerDelegate>> _delegate; | 14 __weak id<ChromeIdentityInteractionManagerDelegate> _delegate; |
msarda
2017/07/03 16:14:43
Remove this and use a synthesized weak property.
stkhapugin
2017/07/11 13:14:42
Done.
| |
12 } | 15 } |
13 @end | 16 @end |
14 | 17 |
15 @implementation ChromeIdentityInteractionManager | 18 @implementation ChromeIdentityInteractionManager |
16 | 19 |
17 - (id<ChromeIdentityInteractionManagerDelegate>)delegate { | 20 - (id<ChromeIdentityInteractionManagerDelegate>)delegate { |
msarda
2017/07/03 16:14:43
Remove this method.
stkhapugin
2017/07/11 13:14:42
Done.
| |
18 return _delegate; | 21 return _delegate; |
19 } | 22 } |
20 | 23 |
21 - (void)setDelegate:(id<ChromeIdentityInteractionManagerDelegate>)delegate { | 24 - (void)setDelegate:(id<ChromeIdentityInteractionManagerDelegate>)delegate { |
msarda
2017/07/03 16:14:42
Remove this set now that the delegate is a regular
stkhapugin
2017/07/11 13:14:42
Done.
| |
22 _delegate.reset(delegate); | 25 _delegate = delegate; |
23 } | 26 } |
24 | 27 |
25 - (BOOL)isCanceling { | 28 - (BOOL)isCanceling { |
26 return NO; | 29 return NO; |
27 } | 30 } |
28 | 31 |
29 - (void)addAccountWithCompletion:(SigninCompletionCallback)completion { | 32 - (void)addAccountWithCompletion:(SigninCompletionCallback)completion { |
30 NOTREACHED() << "Subclasses must override this"; | 33 NOTREACHED() << "Subclasses must override this"; |
31 completion(nil, nil); | 34 completion(nil, nil); |
32 } | 35 } |
33 | 36 |
34 - (void)reauthenticateUserWithID:(NSString*)userID | 37 - (void)reauthenticateUserWithID:(NSString*)userID |
35 email:(NSString*)userEmail | 38 email:(NSString*)userEmail |
36 completion:(SigninCompletionCallback)completion { | 39 completion:(SigninCompletionCallback)completion { |
37 NOTREACHED() << "Subclasses must override this"; | 40 NOTREACHED() << "Subclasses must override this"; |
38 completion(nil, nil); | 41 completion(nil, nil); |
39 } | 42 } |
40 | 43 |
41 - (void)cancelAndDismissAnimated:(BOOL)animated { | 44 - (void)cancelAndDismissAnimated:(BOOL)animated { |
42 NOTREACHED() << "Subclasses must override this"; | 45 NOTREACHED() << "Subclasses must override this"; |
43 } | 46 } |
44 | 47 |
45 @end | 48 @end |
OLD | NEW |