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

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

Issue 1699673002: bluetooth: Require valid UUIDs when testing against Web Bluetooth 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_blacklist.cc
diff --git a/content/browser/bluetooth/bluetooth_blacklist.cc b/content/browser/bluetooth/bluetooth_blacklist.cc
index db717db320bceab1c316fa084356f6db56d4c229..104f7574398c8e0f6a62fc6450d374197f918b20 100644
--- a/content/browser/bluetooth/bluetooth_blacklist.cc
+++ b/content/browser/bluetooth/bluetooth_blacklist.cc
@@ -32,6 +32,7 @@ void BluetoothBlacklist::AddOrDie(const device::BluetoothUUID& uuid,
}
bool BluetoothBlacklist::IsExcluded(const BluetoothUUID& uuid) const {
+ CHECK(uuid.IsValid());
const auto& it = blacklisted_uuids_.find(uuid);
if (it == blacklisted_uuids_.end())
return false;
@@ -51,6 +52,7 @@ bool BluetoothBlacklist::IsExcluded(
}
bool BluetoothBlacklist::IsExcludedFromReads(const BluetoothUUID& uuid) const {
+ CHECK(uuid.IsValid());
ortuno 2016/02/19 20:54:51 Why not check that added UUIDs are valid as well?
scheib 2016/02/22 20:27:12 Done.
const auto& it = blacklisted_uuids_.find(uuid);
if (it == blacklisted_uuids_.end())
return false;
@@ -58,6 +60,7 @@ bool BluetoothBlacklist::IsExcludedFromReads(const BluetoothUUID& uuid) const {
}
bool BluetoothBlacklist::IsExcludedFromWrites(const BluetoothUUID& uuid) const {
+ CHECK(uuid.IsValid());
const auto& it = blacklisted_uuids_.find(uuid);
if (it == blacklisted_uuids_.end())
return false;
« no previous file with comments | « content/browser/bluetooth/bluetooth_blacklist.h ('k') | content/browser/bluetooth/bluetooth_blacklist_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698