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

Side by Side Diff: crypto/mock_apple_keychain.h

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CRYPTO_MOCK_KEYCHAIN_MAC_H_ 5 #ifndef CRYPTO_MOCK_KEYCHAIN_MAC_H_
6 #define CRYPTO_MOCK_KEYCHAIN_MAC_H_ 6 #define CRYPTO_MOCK_KEYCHAIN_MAC_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 void* data) const override; 44 void* data) const override;
45 OSStatus AddGenericPassword(SecKeychainRef keychain, 45 OSStatus AddGenericPassword(SecKeychainRef keychain,
46 UInt32 serviceNameLength, 46 UInt32 serviceNameLength,
47 const char* serviceName, 47 const char* serviceName,
48 UInt32 accountNameLength, 48 UInt32 accountNameLength,
49 const char* accountName, 49 const char* accountName,
50 UInt32 passwordLength, 50 UInt32 passwordLength,
51 const void* passwordData, 51 const void* passwordData,
52 SecKeychainItemRef* itemRef) const override; 52 SecKeychainItemRef* itemRef) const override;
53 53
54 // Returns the password that OSCrypt uses to generate its encryption key.
55 std::string GetEncryptionPassword() const;
56
54 #if !defined(OS_IOS) 57 #if !defined(OS_IOS)
55 OSStatus ItemCopyAttributesAndData(SecKeychainItemRef itemRef, 58 OSStatus ItemCopyAttributesAndData(SecKeychainItemRef itemRef,
56 SecKeychainAttributeInfo* info, 59 SecKeychainAttributeInfo* info,
57 SecItemClass* itemClass, 60 SecItemClass* itemClass,
58 SecKeychainAttributeList** attrList, 61 SecKeychainAttributeList** attrList,
59 UInt32* length, 62 UInt32* length,
60 void** outData) const override; 63 void** outData) const override;
61 // Pass "fail_me" as the data to get errSecAuthFailed. 64 // Pass "fail_me" as the data to get errSecAuthFailed.
62 OSStatus ItemModifyAttributesAndData(SecKeychainItemRef itemRef, 65 OSStatus ItemModifyAttributesAndData(SecKeychainItemRef itemRef,
63 const SecKeychainAttributeList* attrList, 66 const SecKeychainAttributeList* attrList,
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // and |ItemFreeContent|. 241 // and |ItemFreeContent|.
239 mutable int password_data_count_; 242 mutable int password_data_count_;
240 243
241 // Records the password being set when |AddGenericPassword()| gets called. 244 // Records the password being set when |AddGenericPassword()| gets called.
242 mutable std::string add_generic_password_; 245 mutable std::string add_generic_password_;
243 }; 246 };
244 247
245 } // namespace crypto 248 } // namespace crypto
246 249
247 #endif // CRYPTO_MOCK_KEYCHAIN_MAC_H_ 250 #endif // CRYPTO_MOCK_KEYCHAIN_MAC_H_
OLDNEW
« no previous file with comments | « crypto/BUILD.gn ('k') | crypto/mock_apple_keychain.cc » ('j') | shell/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698