summaryrefslogtreecommitdiffstats
path: root/chrome/browser/keychain_mock_mac.cc
diff options
context:
space:
mode:
authorstuartmorgan@google.com <stuartmorgan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 23:44:08 +0000
committerstuartmorgan@google.com <stuartmorgan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 23:44:08 +0000
commit0a21fdef759a46d5aed2017013abf2113a919b23 (patch)
tree4d8097298b4d1385d99569cb09b9633f228adc08 /chrome/browser/keychain_mock_mac.cc
parent07da008e75f1b6d6c69947aae6e2810617766246 (diff)
downloadchromium_src-0a21fdef759a46d5aed2017013abf2113a919b23.zip
chromium_src-0a21fdef759a46d5aed2017013abf2113a919b23.tar.gz
chromium_src-0a21fdef759a46d5aed2017013abf2113a919b23.tar.bz2
Support individual Keychain item deletion in PasswordStoreMac.
Rename AddLogin to AddPassword for consistency with other method names. Remove a confusing out param from the form merge check function. BUG=16486 TEST=Once the UI exists, deleting individual passwords should work on the Mac. Review URL: http://codereview.chromium.org/155451 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20573 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/keychain_mock_mac.cc')
-rw-r--r--chrome/browser/keychain_mock_mac.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/keychain_mock_mac.cc b/chrome/browser/keychain_mock_mac.cc
index a6bd5fd..879ffdc 100644
--- a/chrome/browser/keychain_mock_mac.cc
+++ b/chrome/browser/keychain_mock_mac.cc
@@ -229,6 +229,16 @@ OSStatus MockKeychain::ItemFreeAttributesAndData(
return noErr;
}
+OSStatus MockKeychain::ItemDelete(SecKeychainItemRef itemRef) const {
+ unsigned int item_index = reinterpret_cast<unsigned int>(itemRef) - 1;
+ // The mock only supports deleting the last item.
+ if (item_index != item_count_ - 1) {
+ NOTIMPLEMENTED();
+ }
+ --item_count_;
+ return noErr;
+}
+
OSStatus MockKeychain::SearchCreateFromAttributes(
CFTypeRef keychainOrArray, SecItemClass itemClass,
const SecKeychainAttributeList *attrList,