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

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

Issue 1697873002: bluetooth: Test Web Bluetooth getCharacteristic calls against blacklist. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-blacklist-integration-
Patch Set: Created 4 years, 10 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 c4fe0562a92f8f147fdd61ae4439257845369cd6..2ed8471f3ed01409cfac8327abdfe1d71758bbca 100644
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.cc
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.cc
@@ -792,6 +792,16 @@ void BluetoothDispatcherHost::OnGetCharacteristic(
RecordWebBluetoothFunctionCall(UMAWebBluetoothFunction::GET_CHARACTERISTIC);
RecordGetCharacteristicCharacteristic(characteristic_uuid);
+ // Check Blacklist for characteristic_uuid.
+ if (BluetoothBlacklist::Get().IsExcluded(
ortuno 2016/02/23 22:37:58 You probably want to crash the renderer in QueryCa
scheib 2016/02/24 19:51:28 We discussed in person, and concluded that the ini
+ BluetoothUUID(characteristic_uuid))) {
+ RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome::BLACKLISTED);
+ Send(new BluetoothMsg_GetCharacteristicError(
+ thread_id, request_id,
+ WebBluetoothError::GetCharacteristicWithBlacklistedUUID));
+ return;
+ }
+
const CacheQueryResult query_result =
QueryCacheForService(GetOrigin(frame_routing_id), service_instance_id);

Powered by Google App Engine
This is Rietveld 408576698