Commit dfea4f3e authored by Martin Kreichgauer's avatar Martin Kreichgauer Committed by Commit Bot

Revert "device/fido/mac: add more specific check for TouchID availability"

This reverts commit 6b8ca1f7.

Reason for revert: crbug/938162

Original change's description:
> device/fido/mac: add more specific check for TouchID availability
>
> Prior to macOS 10.13.2, the only way to check for TouchID was to check
> for the ability to evaluate the LAPolicyDeviceOwnerAuthenticationWithBiometrics
> policy. 10.13.2 introduced a more granular check for LABiometryTypeTouchID.
>
> This PR ensures on systems after macOS 10.13.2 that we check for this specific
> biometry, and fall back to to the old check if we do not have access to this new enum.
>
> R=​martinkr@google.com
>
> Bug: N/A
> Change-Id: I3a3d2d332547b09cf3c6e062709ed06b6e1a052d
> Reviewed-on: https://chromium-review.googlesource.com/c/1487811
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Martin Kreichgauer <martinkr@google.com>
> Commit-Queue: Martin Kreichgauer <martinkr@google.com>
> Cr-Commit-Position: refs/heads/master@{#636651}

TBR=rsesek@chromium.org,martinkr@google.com,shelley.vohr@gmail.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 938162
Change-Id: Ieba6da8626b9021df029fc95a9345534a9a67d45
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504308
Commit-Queue: Martin Kreichgauer <martinkr@google.com>
Reviewed-by: default avatarMartin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/master@{#637895}
parent 0cd1a728
......@@ -811,7 +811,6 @@ Shanmuga Pandi M <shanmuga.m@samsung.com>
Shaobo Yan <shaobo.yan@intel.com>
Shashi Kumar <sk.kumar@samsung.com>
Shawn Anastasio <shawnanastasio@gmail.com>
Shelley Vohr <shelley.vohr@gmail.com>
Shen Yu <shenyu.tcv@gmail.com>
Sherry Mou <wenjinm@amazon.com>
Shez Baig <sbaig1@bloomberg.net>
......
......@@ -16,7 +16,6 @@
#import <CoreWLAN/CoreWLAN.h>
#import <IOBluetooth/IOBluetooth.h>
#import <ImageCaptureCore/ImageCaptureCore.h>
#import <LocalAuthentication/LocalAuthentication.h>
#import <QuartzCore/QuartzCore.h>
#include <stdint.h>
......@@ -70,22 +69,6 @@ typedef NSUInteger NSSpringLoadingHighlight;
#endif // MAC_OS_X_VERSION_10_12
#if !defined(MAC_OS_X_VERSION_10_13_2) || \
MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13_2
enum {
LABiometryTypeNone = 0,
LABiometryTypeFaceID = 1,
LABiometryTypeTouchID = 2
};
typedef NSInteger LABiometryType;
@interface LAContext (HighSierraPointTwoSDK)
@property(nonatomic, readonly) LABiometryType biometryType;
@end
#endif // MAC_OS_X_VERSION_10_13_2
// ----------------------------------------------------------------------------
// Define NSStrings only available in newer versions of the OSX SDK to force
// them to be statically linked.
......
......@@ -9,7 +9,6 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/mac/foundation_util.h"
#include "base/mac/sdk_forward_declarations.h"
#include "base/memory/ptr_util.h"
#include "base/sequenced_task_runner.h"
#include "base/strings/sys_string_conversions.h"
......@@ -50,12 +49,9 @@ std::unique_ptr<TouchIdContext> TouchIdContext::Create() {
// static
bool TouchIdContext::TouchIdAvailableImpl() {
base::scoped_nsobject<LAContext> context([[LAContext alloc] init]);
bool available =
return
[context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
error:nil];
if (@available(macOS 10.13.2, *))
return available && [context biometryType] == LABiometryTypeTouchID;
return available;
}
// static
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment