Remove ItemDelete from the Mac version of AppleKeychain
It no longer has callers and was never implemented for the iOS / `SecItem` implementation of `AppleKeychain`. If there's a need for it, it can be brought back after the migration away from `SecKeychain` is complete. Bug: 395659797 Change-Id: I6a6a21009ff519cb3b40937e06a3c61cdb15aaee Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6443473 Reviewed-by: David Benjamin <davidben@chromium.org> Commit-Queue: Mark Rowe <markrowe@chromium.org> Cr-Commit-Position: refs/heads/main@{#1445409}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
0174f08564
commit
c3004e5896
@ -59,10 +59,6 @@ class CRYPTO_EXPORT AppleKeychain {
|
|||||||
UInt32 password_length,
|
UInt32 password_length,
|
||||||
const void* password_data,
|
const void* password_data,
|
||||||
AppleSecKeychainItemRef* item) const;
|
AppleSecKeychainItemRef* item) const;
|
||||||
|
|
||||||
#if BUILDFLAG(IS_MAC)
|
|
||||||
virtual OSStatus ItemDelete(AppleSecKeychainItemRef item) const;
|
|
||||||
#endif // !BUILDFLAG(IS_MAC)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#if BUILDFLAG(IS_MAC)
|
#if BUILDFLAG(IS_MAC)
|
||||||
|
@ -86,11 +86,6 @@ OSStatus AppleKeychain::AddGenericPassword(
|
|||||||
account_name, password_length, password_data, item);
|
account_name, password_length, password_data, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
OSStatus AppleKeychain::ItemDelete(AppleSecKeychainItemRef item) const {
|
|
||||||
base::AutoLock lock(GetMacSecurityServicesLock());
|
|
||||||
return SecKeychainItemDelete(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
ScopedKeychainUserInteractionAllowed::ScopedKeychainUserInteractionAllowed(
|
ScopedKeychainUserInteractionAllowed::ScopedKeychainUserInteractionAllowed(
|
||||||
Boolean allowed,
|
Boolean allowed,
|
||||||
OSStatus* status) {
|
OSStatus* status) {
|
||||||
|
@ -55,10 +55,6 @@ class CRYPTO_EXPORT MockAppleKeychain : public AppleKeychain {
|
|||||||
// Returns the password that OSCrypt uses to generate its encryption key.
|
// Returns the password that OSCrypt uses to generate its encryption key.
|
||||||
std::string GetEncryptionPassword() const;
|
std::string GetEncryptionPassword() const;
|
||||||
|
|
||||||
#if !BUILDFLAG(IS_IOS)
|
|
||||||
OSStatus ItemDelete(SecKeychainItemRef itemRef) const override;
|
|
||||||
#endif // !BUILDFLAG(IS_IOS)
|
|
||||||
|
|
||||||
// |FindGenericPassword()| can return different results depending on user
|
// |FindGenericPassword()| can return different results depending on user
|
||||||
// interaction with the system Keychain. For mocking purposes we allow the
|
// interaction with the system Keychain. For mocking purposes we allow the
|
||||||
// user of this class to specify the result code of the
|
// user of this class to specify the result code of the
|
||||||
|
@ -16,8 +16,4 @@ MockAppleKeychain::MockAppleKeychain()
|
|||||||
|
|
||||||
MockAppleKeychain::~MockAppleKeychain() {}
|
MockAppleKeychain::~MockAppleKeychain() {}
|
||||||
|
|
||||||
OSStatus MockAppleKeychain::ItemDelete(AppleSecKeychainItemRef itemRef) const {
|
|
||||||
return noErr;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace crypto
|
} // namespace crypto
|
||||||
|
Reference in New Issue
Block a user