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

Unified Diff: ios/chrome/browser/ui/commands/show_signin_command.mm

Issue 1124173004: [iOS] Upstream //ios/chrome/browser/ui/commands changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation Created 5 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/commands/show_signin_command.mm
diff --git a/ios/chrome/browser/ui/commands/show_signin_command.mm b/ios/chrome/browser/ui/commands/show_signin_command.mm
new file mode 100644
index 0000000000000000000000000000000000000000..add4797dfea8bde68e6e1e4389cbe687f10d3adc
--- /dev/null
+++ b/ios/chrome/browser/ui/commands/show_signin_command.mm
@@ -0,0 +1,45 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ios/chrome/browser/ui/commands/show_signin_command.h"
+
+#include "base/logging.h"
+#include "base/mac/scoped_block.h"
+#include "ios/chrome/browser/ui/commands/ios_command_ids.h"
+
+@implementation ShowSigninCommand {
+ base::mac::ScopedBlock<ShowSigninCommandCompletionCallback> _callback;
+}
+
+@synthesize operation = _operation;
+@synthesize signInSource = _signInSource;
+
+- (instancetype)initWithTag:(NSInteger)tag {
+ NOTREACHED();
+ return nil;
+}
+
+- (instancetype)initWithOperation:(AuthenticationOperation)operation
+ signInSource:(SignInSource)signInSource
+ callback:
+ (ShowSigninCommandCompletionCallback)callback {
+ if ((self = [super initWithTag:IDC_SHOW_SIGNIN_IOS])) {
+ _operation = operation;
+ _signInSource = signInSource;
+ _callback.reset(callback, base::scoped_policy::RETAIN);
+ }
+ return self;
+}
+
+- (instancetype)initWithOperation:(AuthenticationOperation)operation
+ signInSource:(SignInSource)signInSource {
+ return
+ [self initWithOperation:operation signInSource:signInSource callback:nil];
+}
+
+- (ShowSigninCommandCompletionCallback)callback {
+ return _callback.get();
+}
+
+@end
« no previous file with comments | « ios/chrome/browser/ui/commands/show_signin_command.h ('k') | ios/chrome/browser/ui/show_privacy_settings_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698