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

Unified Diff: content/browser/bluetooth/bluetooth_dispatcher_host.cc

Issue 1611443002: bluetooth: Update BluetoothGATTCharacteristic.value on writeValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@useDataview
Patch Set: Created 4 years, 11 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: content/browser/bluetooth/bluetooth_dispatcher_host.cc
diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.cc b/content/browser/bluetooth/bluetooth_dispatcher_host.cc
index fcb4ada4d4029ff35814bbae1f0fa55a4e70dbc5..eb271048c9ea41df190ea08e598cebce221f46bc 100644
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.cc
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.cc
@@ -919,7 +919,7 @@ void BluetoothDispatcherHost::OnWriteValue(
query_result.characteristic->WriteRemoteCharacteristic(
value, base::Bind(&BluetoothDispatcherHost::OnWriteValueSuccess,
- weak_ptr_on_ui_thread_, thread_id, request_id),
+ weak_ptr_on_ui_thread_, thread_id, request_id, value),
base::Bind(&BluetoothDispatcherHost::OnWriteValueFailed,
weak_ptr_on_ui_thread_, thread_id, request_id));
}
@@ -1223,11 +1223,14 @@ void BluetoothDispatcherHost::OnCharacteristicReadValueError(
TranslateGATTError(error_code, UMAGATTOperation::CHARACTERISTIC_READ)));
}
-void BluetoothDispatcherHost::OnWriteValueSuccess(int thread_id,
- int request_id) {
+void BluetoothDispatcherHost::OnWriteValueSuccess(
+ int thread_id,
+ int request_id,
+ const std::vector<uint8_t>& value) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
RecordCharacteristicWriteValueOutcome(UMAGATTOperationOutcome::SUCCESS);
- Send(new BluetoothMsg_WriteCharacteristicValueSuccess(thread_id, request_id));
+ Send(new BluetoothMsg_WriteCharacteristicValueSuccess(thread_id, request_id,
+ value));
}
void BluetoothDispatcherHost::OnWriteValueFailed(

Powered by Google App Engine
This is Rietveld 408576698