[tvOS] Disable LAContextCanEvaluatePolicy Method
The LAPolicy used by LAContextCanEvaluatePolicy is not available on tvOS. This change disables the method using the tvOS build flag. Bug: 391914246 Change-Id: I2c1f8f53ddeeaf823bf9f1b4f0fb362925c1e082 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6346508 Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com> Reviewed-by: David Benjamin <davidben@chromium.org> Cr-Commit-Position: refs/heads/main@{#1433309}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
077c43f62d
commit
5f27e5afa1
@ -70,8 +70,10 @@ class CRYPTO_EXPORT AppleKeychainV2 {
|
||||
CFErrorRef* error);
|
||||
#endif // !BUILDFLAG(IS_IOS)
|
||||
|
||||
#if !BUILDFLAG(IS_IOS_TVOS)
|
||||
// LAContextCanEvaluatePolicy wraps LAContext's canEvaluatePolicy method.
|
||||
virtual BOOL LAContextCanEvaluatePolicy(LAPolicy policy, NSError** error);
|
||||
#endif // !BUILDFLAG(IS_IOS_TVOS)
|
||||
|
||||
protected:
|
||||
AppleKeychainV2();
|
||||
|
@ -105,10 +105,12 @@ AppleKeychainV2::TaskCopyValueForEntitlement(SecTaskRef task,
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_IOS)
|
||||
|
||||
#if !BUILDFLAG(IS_IOS_TVOS)
|
||||
BOOL AppleKeychainV2::LAContextCanEvaluatePolicy(LAPolicy policy,
|
||||
NSError** error) {
|
||||
LAContext* context = [[LAContext alloc] init];
|
||||
return [context canEvaluatePolicy:policy error:error];
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_IOS_TVOS)
|
||||
|
||||
} // namespace crypto
|
||||
|
@ -58,8 +58,10 @@ class CRYPTO_EXPORT FakeAppleKeychainV2 : public AppleKeychainV2 {
|
||||
CFStringRef entitlement,
|
||||
CFErrorRef* error) override;
|
||||
#endif // !BUILDFLAG(IS_IOS)
|
||||
#if !BUILDFLAG(IS_IOS_TVOS)
|
||||
BOOL LAContextCanEvaluatePolicy(LAPolicy policy,
|
||||
NSError* __autoreleasing* error) override;
|
||||
#endif // !BUILDFLAG(IS_IOS_TVOS)
|
||||
|
||||
private:
|
||||
bool is_secure_enclave_available_ = true;
|
||||
|
@ -316,6 +316,7 @@ FakeAppleKeychainV2::TaskCopyValueForEntitlement(SecTaskRef task,
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_IOS)
|
||||
|
||||
#if !BUILDFLAG(IS_IOS_TVOS)
|
||||
BOOL FakeAppleKeychainV2::LAContextCanEvaluatePolicy(
|
||||
LAPolicy policy,
|
||||
NSError* __autoreleasing* error) {
|
||||
@ -333,5 +334,6 @@ BOOL FakeAppleKeychainV2::LAContextCanEvaluatePolicy(
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_IOS_TVOS)
|
||||
|
||||
} // namespace crypto
|
||||
|
Reference in New Issue
Block a user