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

Unified Diff: chrome/browser/keychain_mock_mac.cc

Issue 155451: Support individual Keychain item deletion (Closed)
Patch Set: Created 11 years, 5 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/keychain_mock_mac.h ('k') | chrome/browser/password_manager/password_store_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/keychain_mock_mac.cc
diff --git a/chrome/browser/keychain_mock_mac.cc b/chrome/browser/keychain_mock_mac.cc
index a6bd5fdb9de40f115e2f82050f5f2bf95ca983c5..879ffdcd2eb11cb6592ef194bebb69b8efdf0fff 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,
« no previous file with comments | « chrome/browser/keychain_mock_mac.h ('k') | chrome/browser/password_manager/password_store_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698