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

Unified Diff: remoting/client/ios/keychain_wrapper.h

Issue 2854273002: [CRD iOS] Implementing save to keychain and user defaults for login info. Refactor remoting service. (Closed)
Patch Set: Cleanup on self review. Created 3 years, 8 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: remoting/client/ios/keychain_wrapper.h
diff --git a/remoting/client/ios/keychain_wrapper.h b/remoting/client/ios/keychain_wrapper.h
new file mode 100644
index 0000000000000000000000000000000000000000..d92b6ae91df6ec3149c77e5a061a59c6bda3ebfb
--- /dev/null
+++ b/remoting/client/ios/keychain_wrapper.h
@@ -0,0 +1,26 @@
+// Copyright 2017 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.
+
+#ifndef REMOTING_CLIENT_IOS_KEYCHAIN_WRAPPER_H_
+#define REMOTING_CLIENT_IOS_KEYCHAIN_WRAPPER_H_
+
+#import <Foundation/Foundation.h>
+
+@class UserInfo;
+
+// Class to abstract the details from how iOS wants to write to the keychain.
+// TODO(nicholss): This will have to be futher refactored when we integrate
+// with the private Google auth.
+@interface KeychainWrapper : NSObject
+
+// Save a refresh token to the keychain.
+- (void)setRefreshToken:(NSString*)refreshToken;
Yuwei 2017/05/04 05:10:15 What about using @property?
nicholss 2017/05/08 17:08:10 In this case I think it is not good to use @proper
Yuwei 2017/05/08 19:00:58 Acknowledged.
+// Get the refresh token from the keychain, if there is one.
+- (NSString*)refreshToken;
+// Reset the keychain and the cache.
+- (void)resetKeychainItem;
+
+@end
+
+#endif // REMOTING_CLIENT_IOS_KEYCHAIN_WRAPPER_H_

Powered by Google App Engine
This is Rietveld 408576698