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

Unified Diff: components/proximity_auth/bluetooth_low_energy_connection_finder.h

Issue 2849493002: [EasyUnlock] Fixing the setup connection finder and message format. (Closed)
Patch Set: date Created 3 years, 8 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
Index: components/proximity_auth/bluetooth_low_energy_connection_finder.h
diff --git a/components/proximity_auth/bluetooth_low_energy_connection_finder.h b/components/proximity_auth/bluetooth_low_energy_connection_finder.h
index 134aeb222f370a35639e5f09f6138629f2254d64..b71acfcf4eff1f314801a6b4ac933c17d3c2a8f0 100644
--- a/components/proximity_auth/bluetooth_low_energy_connection_finder.h
+++ b/components/proximity_auth/bluetooth_low_energy_connection_finder.h
@@ -69,6 +69,7 @@ class BluetoothLowEnergyConnectionFinder
protected:
BluetoothLowEnergyConnectionFinder(
const cryptauth::RemoteDevice remote_device,
+ const std::string& service_uuid,
const std::vector<cryptauth::BeaconSeed>& beacon_seeds,
std::unique_ptr<cryptauth::BackgroundEidGenerator> eid_generator,
cryptauth::BluetoothThrottler* bluetooth_throttler);
@@ -78,6 +79,9 @@ class BluetoothLowEnergyConnectionFinder
virtual std::unique_ptr<cryptauth::Connection> CreateConnection(
const std::string& device_address);
+ // Checks if |device| is advertising the right EID.
+ virtual bool IsRightDevice(device::BluetoothDevice* device);
+
private:
// Callback to be called when the Bluetooth adapter is initialized.
void OnAdapterInitialized(scoped_refptr<device::BluetoothAdapter> adapter);
@@ -99,10 +103,6 @@ class BluetoothLowEnergyConnectionFinder
// Stops the discovery session given by |discovery_session_|.
void StopDiscoverySession();
- // Checks if |device| is the right device: (i) has the adversement data or
- // (ii) is paired and is the same as |remote_device|.
- bool IsRightDevice(device::BluetoothDevice* device);
-
// Restarts the discovery session after creating |connection_| fails.
void RestartDiscoverySessionAsync();
@@ -115,6 +115,9 @@ class BluetoothLowEnergyConnectionFinder
// |advertised_name_|.
cryptauth::RemoteDevice remote_device_;
+ // The UUID of the service used by the Weave socket.
+ std::string service_uuid_;
+
// The BeaconSeeds of the |remote_device|.
std::vector<cryptauth::BeaconSeed> beacon_seeds_;
« no previous file with comments | « components/proximity_auth/BUILD.gn ('k') | components/proximity_auth/bluetooth_low_energy_connection_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698