summaryrefslogtreecommitdiff
path: root/www-client/chromium/files/chromium-bluetooth-tuple-84.patch
blob: b01978cdb41b97c00517e3d06617ff45705b9581 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From ded9cf966b7a9b1986bd420866f7cec74e3c2eff Mon Sep 17 00:00:00 2001
From: David Lechner <david@pybricks.com>
Date: Tue, 09 Jun 2020 11:15:09 -0500
Subject: [PATCH] [bluetooth] fix compile error in dbus fake bluetooth device client

This fixes a compile error that was accidentally introduced in
https://crrev.com/2191232. For unknown reasons this does not cause a
compile error with libc++, which is normally used with chromium, but
does cause an error with stdlibc++.

The API for preparing write requests was not changed in
https://crrev.com/2191232, so the change that introduced this error
was incorrect anyway. This reverts the change that introduced the
error and adds the kTypeRequest argument to the call to WriteValue()
since that was the API that was actually changed in the prior CL.

Bug: 1092470
Change-Id: I6f6fe90ab42aea3db8cac95b69aee5095ea33b31
---

diff --git a/device/bluetooth/dbus/fake_bluetooth_device_client.cc b/device/bluetooth/dbus/fake_bluetooth_device_client.cc
index f7136af..23c5fe3 100644
--- a/device/bluetooth/dbus/fake_bluetooth_device_client.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_device_client.cc
@@ -649,10 +649,9 @@
   for (const auto& prepare_write_request : prepare_write_requests_) {
     bluez::BluezDBusManager::Get()
         ->GetBluetoothGattCharacteristicClient()
-        ->WriteValue(std::get<0>(prepare_write_request),
-                     std::get<1>(prepare_write_request),
-                     std::get<2>(prepare_write_request), base::DoNothing(),
-                     base::DoNothing());
+        ->WriteValue(prepare_write_request.first, prepare_write_request.second,
+                     bluetooth_gatt_characteristic::kTypeRequest,
+                     base::DoNothing(), base::DoNothing());
   }
   prepare_write_requests_.clear();
   std::move(callback).Run();
diff --git a/device/bluetooth/dbus/fake_bluetooth_device_client.h b/device/bluetooth/dbus/fake_bluetooth_device_client.h
index b46715b5..98a9676 100644
--- a/device/bluetooth/dbus/fake_bluetooth_device_client.h
+++ b/device/bluetooth/dbus/fake_bluetooth_device_client.h
@@ -384,7 +384,7 @@
   bool delay_start_discovery_;
 
   // Pending prepare write requests.
-  std::vector<std::tuple<dbus::ObjectPath, std::vector<uint8_t>, std::string>>
+  std::vector<std::pair<dbus::ObjectPath, std::vector<uint8_t>>>
       prepare_write_requests_;
 
   bool should_leave_connections_pending_;