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

Unified Diff: components/proximity_auth/ble/bluetooth_low_energy_connection.h

Issue 2561203002: Migrate weave-related classes from proximity_auth/ble to cryptauth/ble. (Closed)
Patch Set: Created 4 years 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/ble/bluetooth_low_energy_connection.h
diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection.h b/components/proximity_auth/ble/bluetooth_low_energy_connection.h
index eaa766c8359a097085d6dfcb4b2ca38ea437f287..998d0b5a655d06013f1868e943c8d54d1d565546 100644
--- a/components/proximity_auth/ble/bluetooth_low_energy_connection.h
+++ b/components/proximity_auth/ble/bluetooth_low_energy_connection.h
@@ -16,9 +16,9 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
-#include "components/proximity_auth/ble/bluetooth_low_energy_characteristics_finder.h"
-#include "components/proximity_auth/ble/fake_wire_message.h"
-#include "components/proximity_auth/ble/remote_attribute.h"
+#include "components/cryptauth/ble/bluetooth_low_energy_characteristics_finder.h"
+#include "components/cryptauth/ble/fake_wire_message.h"
+#include "components/cryptauth/ble/remote_attribute.h"
#include "components/proximity_auth/connection.h"
#include "device/bluetooth/bluetooth_adapter.h"
#include "device/bluetooth/bluetooth_device.h"
@@ -109,10 +109,11 @@ class BluetoothLowEnergyConnection : public Connection,
void SetTaskRunnerForTesting(scoped_refptr<base::TaskRunner> task_runner);
// Virtual for testing.
- virtual BluetoothLowEnergyCharacteristicsFinder* CreateCharacteristicsFinder(
- const BluetoothLowEnergyCharacteristicsFinder::SuccessCallback&
+ virtual cryptauth::BluetoothLowEnergyCharacteristicsFinder*
+ CreateCharacteristicsFinder(
+ const cryptauth::BluetoothLowEnergyCharacteristicsFinder::SuccessCallback&
success_callback,
- const BluetoothLowEnergyCharacteristicsFinder::ErrorCallback&
+ const cryptauth::BluetoothLowEnergyCharacteristicsFinder::ErrorCallback&
error_callback);
// proximity_auth::Connection:
@@ -158,14 +159,15 @@ class BluetoothLowEnergyConnection : public Connection,
// Callback called when |to_peripheral_char_| and |from_peripheral_char_| were
// found.
- void OnCharacteristicsFound(const RemoteAttribute& service,
- const RemoteAttribute& to_peripheral_char,
- const RemoteAttribute& from_peripheral_char);
+ void OnCharacteristicsFound(
+ const cryptauth::RemoteAttribute& service,
+ const cryptauth::RemoteAttribute& to_peripheral_char,
+ const cryptauth::RemoteAttribute& from_peripheral_char);
// Callback called there was an error finding the characteristics.
void OnCharacteristicsFinderError(
- const RemoteAttribute& to_peripheral_char,
- const RemoteAttribute& from_peripheral_char);
+ const cryptauth::RemoteAttribute& to_peripheral_char,
+ const cryptauth::RemoteAttribute& from_peripheral_char);
// Starts a notify session for |from_peripheral_char_| when ready
// (SubStatus::CHARACTERISTICS_FOUND).
@@ -248,13 +250,13 @@ class BluetoothLowEnergyConnection : public Connection,
scoped_refptr<device::BluetoothAdapter> adapter_;
// Remote service the |gatt_connection_| was established with.
- RemoteAttribute remote_service_;
+ cryptauth::RemoteAttribute remote_service_;
// Characteristic used to send data to the remote device.
- RemoteAttribute to_peripheral_char_;
+ cryptauth::RemoteAttribute to_peripheral_char_;
// Characteristic used to receive data from the remote device.
- RemoteAttribute from_peripheral_char_;
+ cryptauth::RemoteAttribute from_peripheral_char_;
// Throttles repeated connection attempts to the same device. This is a
// workaround for crbug.com/508919. Not owned, must outlive this instance.
@@ -266,7 +268,7 @@ class BluetoothLowEnergyConnection : public Connection,
std::unique_ptr<device::BluetoothGattConnection> gatt_connection_;
// The characteristics finder for remote device.
- std::unique_ptr<BluetoothLowEnergyCharacteristicsFinder>
+ std::unique_ptr<cryptauth::BluetoothLowEnergyCharacteristicsFinder>
characteristic_finder_;
// The notify session for |from_peripheral_char|.

Powered by Google App Engine
This is Rietveld 408576698