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

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

Issue 2615273002: Bump Bluetooth max filter name length from 29 bytes to 240 bytes (Closed)
Patch Set: Expand max length comments and add spec citation 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 19cad9b7c8ea02382046bf52fcc3db903a22a406..090df58aa6035fe10718573ea765619b3bde7b83 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -79,8 +79,11 @@ namespace content {
bool BluetoothDeviceChooserController::use_test_scan_duration_ = false;
namespace {
-constexpr size_t kMaxLengthForDeviceName =
- 29; // max length of device name in filter.
+// 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.
jeffcarp 2017/01/11 01:47:27 Added spec citation here and copied over the comme
+constexpr size_t kMaxLengthForDeviceName = 240;
// The duration of a Bluetooth Scan in seconds.
constexpr int kScanDuration = 60;

Powered by Google App Engine
This is Rietveld 408576698