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

Unified Diff: device/bluetooth/test/fake_peripheral.h

Issue 2921233002: Revert of bluetooth: Implement simulateGATTConnectionResponse() (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « device/bluetooth/test/fake_central.cc ('k') | device/bluetooth/test/fake_peripheral.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/test/fake_peripheral.h
diff --git a/device/bluetooth/test/fake_peripheral.h b/device/bluetooth/test/fake_peripheral.h
index b105c4f134be7db1ec83d456dd737fbb7bcab8ef..8e6222234814a651def3dd1e72fd8dd351cf14ce 100644
--- a/device/bluetooth/test/fake_peripheral.h
+++ b/device/bluetooth/test/fake_peripheral.h
@@ -8,7 +8,6 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
#include "base/optional.h"
#include "device/bluetooth/bluetooth_device.h"
#include "device/bluetooth/test/fake_central.h"
@@ -25,19 +24,12 @@
// Changes the name of the device.
void SetName(base::Optional<std::string> name);
- // Set it to indicate if the system has connected to the Peripheral outside of
- // the Bluetooth interface e.g. the user connected to the device through
- // system settings.
- void SetSystemConnected(bool gatt_connected);
+ // Set it to indicate if the Peripheral is connected or not.
+ void SetGattConnected(bool gatt_connected);
// Updates the peripheral's UUIDs that are returned by
// BluetoothDevice::GetUUIDs().
void SetServiceUUIDs(UUIDSet service_uuids);
-
- // If |code| is kHCISuccess calls a pending success callback for
- // CreateGattConnection. Otherwise calls a pending error callback
- // with the ConnectErrorCode corresponding to |code|.
- void SetNextGATTConnectionResponse(uint16_t code);
// BluetoothDevice overrides:
uint32_t GetBluetoothClass() const override;
@@ -86,31 +78,16 @@
const device::BluetoothUUID& uuid,
const ConnectToServiceCallback& callback,
const ConnectToServiceErrorCallback& error_callback) override;
- void CreateGattConnection(
- const GattConnectionCallback& callback,
- const ConnectErrorCallback& error_callback) override;
protected:
void CreateGattConnectionImpl() override;
void DisconnectGatt() override;
private:
- void DispatchConnectionResponse();
-
const std::string address_;
base::Optional<std::string> name_;
+ bool gatt_connected_;
UUIDSet service_uuids_;
- // True when the system has connected to the device outside of the Bluetooth
- // interface e.g. the user connected to the device through system settings.
- bool system_connected_;
- // True when this Bluetooth interface is connected to the device.
- bool gatt_connected_;
-
- // Used to decide which callback should be called when
- // CreateGattConnection is called.
- base::Optional<uint16_t> next_connection_response_;
-
- base::WeakPtrFactory<FakePeripheral> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(FakePeripheral);
};
« no previous file with comments | « device/bluetooth/test/fake_central.cc ('k') | device/bluetooth/test/fake_peripheral.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698