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

Unified Diff: device/bluetooth/test/bluetooth_test_bluez.cc

Issue 2076433002: Revert of Add support in Chrome to send notifications to a specific device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « device/bluetooth/test/bluetooth_test_bluez.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/test/bluetooth_test_bluez.cc
diff --git a/device/bluetooth/test/bluetooth_test_bluez.cc b/device/bluetooth/test/bluetooth_test_bluez.cc
index 537da559c8f3ecb21b4e11c07eb4d697db2bb569..f1188ed64b99d7093cc892d977671510eaadb123 100644
--- a/device/bluetooth/test/bluetooth_test_bluez.cc
+++ b/device/bluetooth/test/bluetooth_test_bluez.cc
@@ -5,7 +5,6 @@
#include "device/bluetooth/test/bluetooth_test_bluez.h"
#include <string>
-#include <tuple>
#include <utility>
#include "base/bind.h"
@@ -279,8 +278,7 @@
return characteristic_provider->NotificationsChange(start);
}
-BluetoothTestBase::NotificationType
-BluetoothTestBlueZ::LastNotifactionValueForCharacteristic(
+std::vector<uint8_t> BluetoothTestBlueZ::LastNotifactionValueForCharacteristic(
BluetoothLocalGattCharacteristic* characteristic) {
bluez::BluetoothLocalGattCharacteristicBlueZ* characteristic_bluez =
static_cast<bluez::BluetoothLocalGattCharacteristicBlueZ*>(
@@ -293,22 +291,8 @@
fake_bluetooth_gatt_manager_client->GetCharacteristicServiceProvider(
characteristic_bluez->object_path());
- if (!characteristic_provider)
- return NotificationType();
-
- bluez::BluetoothAdapterBlueZ* adapter_bluez =
- static_cast<bluez::BluetoothAdapterBlueZ*>(adapter_.get());
-
- std::string device_id;
- bluez::BluetoothDeviceBlueZ* device = adapter_bluez->GetDeviceWithPath(
- characteristic_provider->last_device_path());
- if (device)
- device_id = device->GetIdentifier();
-
- NotificationType notification = {
- device_id, characteristic_provider->last_value(),
- characteristic_provider->last_indicate_flag()};
- return notification;
+ return characteristic_provider ? characteristic_provider->sent_value()
+ : std::vector<uint8_t>();
}
std::vector<BluetoothLocalGattService*>
« no previous file with comments | « device/bluetooth/test/bluetooth_test_bluez.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698