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

Unified Diff: device/bluetooth/bluez/bluetooth_adapter_bluez.cc

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/bluez/bluetooth_adapter_bluez.cc
diff --git a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
index c5cdc9ad39d1e4bf473a5fc56158589fa1ca67f0..9543d52270a8ac585e6b43288bea0221937a3b86 100644
--- a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
@@ -21,6 +21,7 @@
#include "device/bluetooth/bluetooth_device.h"
#include "device/bluetooth/bluetooth_discovery_session_outcome.h"
#include "device/bluetooth/bluetooth_socket_thread.h"
+#include "device/bluetooth/bluetooth_types.h"
#include "device/bluetooth/bluetooth_uuid.h"
#include "device/bluetooth/bluez/bluetooth_adapter_profile_bluez.h"
#include "device/bluetooth/bluez/bluetooth_advertisement_bluez.h"
@@ -50,6 +51,7 @@ using device::BluetoothAudioSink;
using device::BluetoothDevice;
using device::BluetoothDiscoveryFilter;
using device::BluetoothSocket;
+using device::BluetoothTransport;
using device::BluetoothUUID;
using device::UMABluetoothDiscoverySessionOutcome;
@@ -1273,8 +1275,8 @@ void BluetoothAdapterBlueZ::AddDiscoverySession(
if (discovery_filter) {
discovery_request_pending_ = true;
- std::unique_ptr<BluetoothDiscoveryFilter> df(new BluetoothDiscoveryFilter(
- BluetoothDiscoveryFilter::Transport::TRANSPORT_DUAL));
+ std::unique_ptr<BluetoothDiscoveryFilter> df(
+ new BluetoothDiscoveryFilter(BluetoothTransport::TRANSPORT_DUAL));
df->CopyFrom(*discovery_filter);
SetDiscoveryFilter(
std::move(df),
@@ -1391,13 +1393,11 @@ void BluetoothAdapterBlueZ::SetDiscoveryFilter(
dbus_discovery_filter.rssi.reset(new int16_t(rssi));
transport = current_filter_->GetTransport();
- if (transport == BluetoothDiscoveryFilter::Transport::TRANSPORT_LE) {
+ if (transport == BluetoothTransport::TRANSPORT_LE) {
dbus_discovery_filter.transport.reset(new std::string("le"));
- } else if (transport ==
- BluetoothDiscoveryFilter::Transport::TRANSPORT_CLASSIC) {
+ } else if (transport == BluetoothTransport::TRANSPORT_CLASSIC) {
dbus_discovery_filter.transport.reset(new std::string("bredr"));
- } else if (transport ==
- BluetoothDiscoveryFilter::Transport::TRANSPORT_DUAL) {
+ } else if (transport == BluetoothTransport::TRANSPORT_DUAL) {
dbus_discovery_filter.transport.reset(new std::string("auto"));
}

Powered by Google App Engine
This is Rietveld 408576698