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

Unified Diff: crypto/mock_apple_keychain.h

Issue 1207373002: Implement Mac Keychain migration algorithm. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ilya's comments Created 5 years, 6 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
« no previous file with comments | « chrome/browser/password_manager/password_store_mac_unittest.cc ('k') | crypto/mock_apple_keychain_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/mock_apple_keychain.h
diff --git a/crypto/mock_apple_keychain.h b/crypto/mock_apple_keychain.h
index 3948d489755a3049a268772763648fe5d3cf9994..f73d3a6466ed23c5420ffc001c75d7cf57541f52 100644
--- a/crypto/mock_apple_keychain.h
+++ b/crypto/mock_apple_keychain.h
@@ -118,6 +118,8 @@ class CRYPTO_EXPORT MockAppleKeychain : public AppleKeychain {
};
// Adds a keychain item with the given info to the test set.
void AddTestItem(const KeychainTestData& item_data);
+
+ void set_locked(bool locked) { locked_ = locked; }
#endif // !defined(OS_IOS)
// |FindGenericPassword()| can return different results depending on user
@@ -201,6 +203,10 @@ class CRYPTO_EXPORT MockAppleKeychain : public AppleKeychain {
static const SecKeychainSearchRef kDummySearchRef;
+ // Simulates the state when the user refuses to unclock the Keychain.
+ // If true, reading and modifying a password value result in errSecAuthFailed.
+ bool locked_;
+
typedef struct KeychainPasswordData {
KeychainPasswordData() : data(NULL), length(0) {}
void* data;
« no previous file with comments | « chrome/browser/password_manager/password_store_mac_unittest.cc ('k') | crypto/mock_apple_keychain_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698