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

Unified Diff: device/bluetooth/bluetooth_adapter_mac.mm

Issue 2063353002: device/bluetooth: split out transport enum (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: renaming header, moving TransportMask back into filter Created 4 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
Index: device/bluetooth/bluetooth_adapter_mac.mm
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
index d3475d435b5b7748bba84673b0b5c90782869f9b..2cfddcf4d8a81fbd30cf294df2f0d9a48aebdec8 100644
--- a/device/bluetooth/bluetooth_adapter_mac.mm
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
@@ -29,6 +29,7 @@
#include "device/bluetooth/bluetooth_discovery_session_outcome.h"
#include "device/bluetooth/bluetooth_low_energy_central_manager_delegate.h"
#include "device/bluetooth/bluetooth_socket_mac.h"
+#include "device/bluetooth/bluetooth_types.h"
namespace {
@@ -321,11 +322,11 @@ void BluetoothAdapterMac::RemoveDiscoverySession(
// Default to dual discovery if |discovery_filter| is NULL.
BluetoothDiscoveryFilter::TransportMask transport =
- BluetoothDiscoveryFilter::Transport::TRANSPORT_DUAL;
+ BluetoothTransport::TRANSPORT_DUAL;
if (discovery_filter)
transport = discovery_filter->GetTransport();
- if (transport & BluetoothDiscoveryFilter::Transport::TRANSPORT_CLASSIC) {
+ if (transport & BluetoothTransport::TRANSPORT_CLASSIC) {
if (!classic_discovery_manager_->StopDiscovery()) {
DVLOG(1) << "Failed to stop classic discovery";
// TODO: Provide a more precise error here.
@@ -333,7 +334,7 @@ void BluetoothAdapterMac::RemoveDiscoverySession(
return;
}
}
- if (transport & BluetoothDiscoveryFilter::Transport::TRANSPORT_LE) {
+ if (transport & BluetoothTransport::TRANSPORT_LE) {
if (IsLowEnergyAvailable())
low_energy_discovery_manager_->StopDiscovery();
}
@@ -356,11 +357,11 @@ bool BluetoothAdapterMac::StartDiscovery(
// Default to dual discovery if |discovery_filter| is NULL. IOBluetooth seems
// allow starting low energy and classic discovery at once.
BluetoothDiscoveryFilter::TransportMask transport =
- BluetoothDiscoveryFilter::Transport::TRANSPORT_DUAL;
+ BluetoothTransport::TRANSPORT_DUAL;
if (discovery_filter)
transport = discovery_filter->GetTransport();
- if ((transport & BluetoothDiscoveryFilter::Transport::TRANSPORT_CLASSIC) &&
+ if ((transport & BluetoothTransport::TRANSPORT_CLASSIC) &&
!classic_discovery_manager_->IsDiscovering()) {
// TODO(krstnmnlsn): If a classic discovery session is already running then
// we should update its filter. crbug.com/498056
@@ -369,7 +370,7 @@ bool BluetoothAdapterMac::StartDiscovery(
return false;
}
}
- if (transport & BluetoothDiscoveryFilter::Transport::TRANSPORT_LE) {
+ if (transport & BluetoothTransport::TRANSPORT_LE) {
// Begin a low energy discovery session or update it if one is already
// running.
if (IsLowEnergyAvailable())

Powered by Google App Engine
This is Rietveld 408576698