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

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: remove useless TransportMask 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..cffac19ec8b42f75badbaf92e514b43868d098a6 100644
--- a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
@@ -18,6 +18,7 @@
#include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
+#include "device/bluetooth/bluetooth_common.h"
#include "device/bluetooth/bluetooth_device.h"
#include "device/bluetooth/bluetooth_discovery_session_outcome.h"
#include "device/bluetooth/bluetooth_socket_thread.h"
@@ -1273,8 +1274,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(device::BLUETOOTH_TRANSPORT_DUAL));
df->CopyFrom(*discovery_filter);
SetDiscoveryFilter(
std::move(df),
@@ -1391,13 +1392,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 == device::BLUETOOTH_TRANSPORT_LE) {
dbus_discovery_filter.transport.reset(new std::string("le"));
- } else if (transport ==
- BluetoothDiscoveryFilter::Transport::TRANSPORT_CLASSIC) {
+ } else if (transport == device::BLUETOOTH_TRANSPORT_CLASSIC) {
dbus_discovery_filter.transport.reset(new std::string("bredr"));
- } else if (transport ==
- BluetoothDiscoveryFilter::Transport::TRANSPORT_DUAL) {
+ } else if (transport == device::BLUETOOTH_TRANSPORT_DUAL) {
dbus_discovery_filter.transport.reset(new std::string("auto"));
}

Powered by Google App Engine
This is Rietveld 408576698