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

Side by Side Diff: ios/chrome/browser/ui/commands/show_signin_command.mm

Issue 2880333003: Adding ChromeIdentity in ShowSigninCommand. (Closed)
Patch Set: Fixing the build 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/ui/commands/show_signin_command.h ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chrome/browser/ui/commands/show_signin_command.h" 5 #import "ios/chrome/browser/ui/commands/show_signin_command.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" 8 #include "ios/chrome/browser/ui/commands/ios_command_ids.h"
9 9
10 #if !defined(__has_feature) || !__has_feature(objc_arc) 10 #if !defined(__has_feature) || !__has_feature(objc_arc)
11 #error "This file requires ARC support." 11 #error "This file requires ARC support."
12 #endif 12 #endif
13 13
14 @implementation ShowSigninCommand 14 @implementation ShowSigninCommand
15 15
16 @synthesize operation = _operation; 16 @synthesize operation = _operation;
17 @synthesize identity = _identity;
17 @synthesize accessPoint = _accessPoint; 18 @synthesize accessPoint = _accessPoint;
18 @synthesize promoAction = _promoAction; 19 @synthesize promoAction = _promoAction;
19 @synthesize callback = _callback; 20 @synthesize callback = _callback;
20 21
21 - (instancetype)initWithTag:(NSInteger)tag { 22 - (instancetype)initWithTag:(NSInteger)tag {
22 NOTREACHED(); 23 NOTREACHED();
23 return nil; 24 return nil;
24 } 25 }
25 26
26 - (instancetype)initWithOperation:(AuthenticationOperation)operation 27 - (instancetype)initWithOperation:(AuthenticationOperation)operation
28 identity:(ChromeIdentity*)identity
27 accessPoint:(signin_metrics::AccessPoint)accessPoint 29 accessPoint:(signin_metrics::AccessPoint)accessPoint
28 promoAction:(signin_metrics::PromoAction)promoAction 30 promoAction:(signin_metrics::PromoAction)promoAction
29 callback: 31 callback:
30 (ShowSigninCommandCompletionCallback)callback { 32 (ShowSigninCommandCompletionCallback)callback {
31 if ((self = [super initWithTag:IDC_SHOW_SIGNIN_IOS])) { 33 if ((self = [super initWithTag:IDC_SHOW_SIGNIN_IOS])) {
34 DCHECK(operation == AUTHENTICATION_OPERATION_SIGNIN || identity == nil);
32 _operation = operation; 35 _operation = operation;
36 _identity = identity;
33 _accessPoint = accessPoint; 37 _accessPoint = accessPoint;
34 _promoAction = promoAction; 38 _promoAction = promoAction;
35 _callback = [callback copy]; 39 _callback = [callback copy];
36 } 40 }
37 return self; 41 return self;
38 } 42 }
39 43
40 - (instancetype)initWithOperation:(AuthenticationOperation)operation 44 - (instancetype)initWithOperation:(AuthenticationOperation)operation
41 accessPoint:(signin_metrics::AccessPoint)accessPoint 45 accessPoint:(signin_metrics::AccessPoint)accessPoint
42 promoAction:(signin_metrics::PromoAction)promoAction { 46 promoAction:(signin_metrics::PromoAction)promoAction {
43 return [self initWithOperation:operation 47 return [self initWithOperation:operation
48 identity:nil
44 accessPoint:accessPoint 49 accessPoint:accessPoint
45 promoAction:promoAction 50 promoAction:promoAction
46 callback:nil]; 51 callback:nil];
47 } 52 }
48 53
49 - (instancetype)initWithOperation:(AuthenticationOperation)operation 54 - (instancetype)initWithOperation:(AuthenticationOperation)operation
50 accessPoint:(signin_metrics::AccessPoint)accessPoint { 55 accessPoint:(signin_metrics::AccessPoint)accessPoint {
51 return [self initWithOperation:operation 56 return [self initWithOperation:operation
57 identity:nil
52 accessPoint:accessPoint 58 accessPoint:accessPoint
53 promoAction:signin_metrics::PromoAction:: 59 promoAction:signin_metrics::PromoAction::
54 PROMO_ACTION_NO_SIGNIN_PROMO 60 PROMO_ACTION_NO_SIGNIN_PROMO
55 callback:nil]; 61 callback:nil];
56 } 62 }
57 63
58 @end 64 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/commands/show_signin_command.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698