summaryrefslogtreecommitdiffstats
path: root/chrome/browser/keychain_mac.h
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-23 16:36:20 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-23 16:36:20 +0000
commit06139a231bd4d3216fa296a8957a72038149ca83 (patch)
treec5d7539f271b53bddbd92c3902d95aa514d5873e /chrome/browser/keychain_mac.h
parent97c8e0369a422f0eb7f8c71418247cf75e68cd38 (diff)
downloadchromium_src-06139a231bd4d3216fa296a8957a72038149ca83.zip
chromium_src-06139a231bd4d3216fa296a8957a72038149ca83.tar.gz
chromium_src-06139a231bd4d3216fa296a8957a72038149ca83.tar.bz2
Implement the add/update functionality for Keychain that PasswordStoreMac will
need, and modify MockKeychain slightly to allow unit testing it. BUG=none TEST=none Review URL: http://codereview.chromium.org/146002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19026 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/keychain_mac.h')
-rw-r--r--chrome/browser/keychain_mac.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/keychain_mac.h b/chrome/browser/keychain_mac.h
index a07d2a0..65eeb37 100644
--- a/chrome/browser/keychain_mac.h
+++ b/chrome/browser/keychain_mac.h
@@ -27,6 +27,10 @@ class MacKeychain {
SecItemClass *itemClass, SecKeychainAttributeList **attrList,
UInt32 *length, void **outData) const;
+ virtual OSStatus ItemModifyAttributesAndData(
+ SecKeychainItemRef itemRef, const SecKeychainAttributeList *attrList,
+ UInt32 length, const void *data) const;
+
virtual OSStatus ItemFreeAttributesAndData(SecKeychainAttributeList *attrList,
void *data) const;
@@ -38,6 +42,20 @@ class MacKeychain {
virtual OSStatus SearchCopyNext(SecKeychainSearchRef searchRef,
SecKeychainItemRef *itemRef) const;
+ virtual OSStatus AddInternetPassword(SecKeychainRef keychain,
+ UInt32 serverNameLength,
+ const char *serverName,
+ UInt32 securityDomainLength,
+ const char *securityDomain,
+ UInt32 accountNameLength,
+ const char *accountName,
+ UInt32 pathLength, const char *path,
+ UInt16 port, SecProtocolType protocol,
+ SecAuthenticationType authenticationType,
+ UInt32 passwordLength,
+ const void *passwordData,
+ SecKeychainItemRef *itemRef) const;
+
// Calls CFRelease on the given ref, after checking that |ref| is non-NULL.
virtual void Free(CFTypeRef ref) const;