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

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

Issue 2642123003: Bluetooth: Make maximum possible name filter 248 bytes, not 240 (Closed)
Patch Set: Correct 249->248 bytes in layout test Created 3 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_device_chooser_controller.cc
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
index 611d3d143752901d4622f42faa978851d661e7b7..265034c64ce4a172e670f6373da0a631cd5a69f2 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -79,11 +79,9 @@ namespace content {
bool BluetoothDeviceChooserController::use_test_scan_duration_ = false;
namespace {
-// Max length of device name in filter. A name coming from an adv packet
-// is max 29 bytes (adv packet max size 31 bytes - 2 byte length field),
-// but the name can also be acquired via gap.device_name, so it is limited
-// to the max EIR packet size of 240 bytes. See Core Spec 5.0, vol 3, C, 8.1.2.
-constexpr size_t kMaxLengthForDeviceName = 240;
+// Max length of device name in filter. Bluetooth 5.0 3.C.3.2.2.3 states that
+// the maximum device name length is 248 bytes (UTF-8 encoded).
+constexpr size_t kMaxLengthForDeviceName = 248;
// The duration of a Bluetooth Scan in seconds.
constexpr int kScanDuration = 60;

Powered by Google App Engine
This is Rietveld 408576698