Chromium Code Reviews| 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 22ad2c63fd955f1db5bb3032a2cc1020f01c2ff4..f783d31e6a768667f3bb4e1c466d1b382e1ad99f 100644 |
| --- a/content/browser/bluetooth/bluetooth_dispatcher_host.cc |
| +++ b/content/browser/bluetooth/bluetooth_dispatcher_host.cc |
| @@ -866,6 +866,14 @@ void BluetoothDispatcherHost::OnReadValue( |
| return; |
| } |
| + if (BluetoothBlacklist::Get().IsExcludedFromReads( |
| + query_result.characteristic->GetUUID())) { |
| + RecordCharacteristicReadValueOutcome(UMAGATTOperationOutcome::BLACKLISTED); |
|
ortuno
2016/02/26 00:07:11
Any reason why you put read/write in the same hist
scheib
2016/02/26 00:49:49
Same histogram enumeration, but different histogra
|
| + Send(new BluetoothMsg_ReadCharacteristicValueError( |
| + thread_id, request_id, WebBluetoothError::BlacklistedRead)); |
| + return; |
| + } |
| + |
| query_result.characteristic->ReadRemoteCharacteristic( |
| base::Bind(&BluetoothDispatcherHost::OnCharacteristicValueRead, |
| weak_ptr_on_ui_thread_, thread_id, request_id), |
| @@ -908,6 +916,14 @@ void BluetoothDispatcherHost::OnWriteValue( |
| return; |
| } |
| + if (BluetoothBlacklist::Get().IsExcludedFromWrites( |
| + query_result.characteristic->GetUUID())) { |
| + RecordCharacteristicWriteValueOutcome(UMAGATTOperationOutcome::BLACKLISTED); |
| + Send(new BluetoothMsg_WriteCharacteristicValueError( |
| + thread_id, request_id, WebBluetoothError::BlacklistedWrite)); |
| + return; |
| + } |
| + |
| query_result.characteristic->WriteRemoteCharacteristic( |
| value, base::Bind(&BluetoothDispatcherHost::OnWriteValueSuccess, |
| weak_ptr_on_ui_thread_, thread_id, request_id), |