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

Unified Diff: device/bluetooth/bluetooth_adapter_mac.h

Issue 1232613004: The first 3 BluetoothTest.* unit tests now running on Mac as well. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@movCBCM
Patch Set: pulling in origin/master so hopefully the patch will patch.. Created 5 years, 5 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: device/bluetooth/bluetooth_adapter_mac.h
diff --git a/device/bluetooth/bluetooth_adapter_mac.h b/device/bluetooth/bluetooth_adapter_mac.h
index 38070b054be483fd0cd4e728d96fd150db90d832..8a28ffe0cc192ec11f9ecd5781f487e7dc865831 100644
--- a/device/bluetooth/bluetooth_adapter_mac.h
+++ b/device/bluetooth/bluetooth_adapter_mac.h
@@ -42,6 +42,10 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac
public BluetoothLowEnergyDiscoveryManagerMac::Observer {
public:
static base::WeakPtr<BluetoothAdapter> CreateAdapter();
+ static base::WeakPtr<BluetoothAdapter> CreateAdapterForTest(
+ std::string name,
+ std::string address,
+ scoped_refptr<base::SequencedTaskRunner> ui_task_runner);
// BluetoothAdapter overrides:
std::string GetAddress() const override;
@@ -92,6 +96,11 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac
// (crbug.com/506287).
static bool IsLowEnergyAvailable();
+ // Resets |low_energy_central_manager_| to |central_manager| and sets
+ // |low_energy_central_manager_delegate_| as its delegate. Should be called
scheib 2015/07/17 21:26:04 'its' is a tad ambiguous. Try "as the manager's de
krstnmnlsn 2015/07/17 23:14:50 Done.
+ // only when CoreBluetooth is available.
+ void SetCentralManagerForTesting(CBCentralManager* central_manager);
+
protected:
// BluetoothAdapter override:
void RemovePairingDelegateInternal(
@@ -148,15 +157,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac
// observers.
void AddPairedDevices();
- // Private method for testing. Resets |low_energy_central_manager_| to
- // |central_manager| and sets |low_energy_central_manager_delegate_| as its
- // delegate. Should be called only when CoreBluetooth is available.
- void SetCentralManagerForTesting(CBCentralManager* central_manager);
-
std::string address_;
std::string name_;
- bool powered_;
-
+ bool classic_powered_;
int num_discovery_sessions_;
// Discovery manager for Bluetooth Classic.

Powered by Google App Engine
This is Rietveld 408576698