Persistent whitelist for Bluetooth low energy devices.
commitb8bc433ac7d9254ac9b58b33d3073831c6deeb87
authorsacomoto <sacomoto@chromium.org>
Wed, 8 Jul 2015 17:11:28 +0000 (8 10:11 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 8 Jul 2015 17:11:59 +0000 (8 17:11 +0000)
tree760770ddf7829f10f8eced9bc515e3bf0e97b117
parent41634b16099cde386dc1090423f566bd4624070c
Persistent whitelist for Bluetooth low energy devices.

This CL adds a persistent whitelist for BLE devices to be used with proximity_auth::ProximityAuthBleSytem and proximity_auth::BluetoothLowEnergyConnectionFinder.

Currently, in BLE connection finder a device has to satisfy two conditions for the connection to be established: (i) paired and (ii) has a given service visible (either advertising or cached).

The problem with this strategy is that when the service cache is dropped by CrOS and the device has the service but is not advertising BLE connection finder is unable to connect.

This CL solves this problem, if a given device is whitelisted then BLE connection finder will connect even if (ii) is not satisfied.

A device is whitelisted if a connection is successfully established and its public key is register in CryptAuth. When a device is removed from CryptAuth it also removed from the whitelist.

TEST=unit tests
BUG=505464

Review URL: https://codereview.chromium.org/1208073003

Cr-Commit-Position: refs/heads/master@{#337845}
15 files changed:
chrome/browser/signin/easy_unlock_service.cc
components/components_tests.gyp
components/proximity_auth.gypi
components/proximity_auth/ble/BUILD.gn
components/proximity_auth/ble/bluetooth_low_energy_connection.cc
components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h
components/proximity_auth/ble/bluetooth_low_energy_connection_finder_unittest.cc
components/proximity_auth/ble/bluetooth_low_energy_device_whitelist.cc [new file with mode: 0644]
components/proximity_auth/ble/bluetooth_low_energy_device_whitelist.h [new file with mode: 0644]
components/proximity_auth/ble/bluetooth_low_energy_device_whitelist_unittest.cc [new file with mode: 0644]
components/proximity_auth/ble/pref_names.cc [new file with mode: 0644]
components/proximity_auth/ble/pref_names.h [new file with mode: 0644]
components/proximity_auth/ble/proximity_auth_ble_system.cc
components/proximity_auth/ble/proximity_auth_ble_system.h