bluetooth: Fix permissions flag check in service
This change fixes the checks for the WebBluetoothNewPermissionsBackend feature flag. Previously, it was checking if the BluetoothDelegate* was not null and if the flag was enabled in the same statement. This is incorrect because it falls back to using the original permissions system if the delegate is null, which shouldn't happen if the feature flag is enabled. With this change, the feature flag is checked first, then the delegate pointer. If the delegate pointer is null, then the current Web Bluetooth operation fails. Design doc: https://docs.google.com/document/d/1h3uAVXJARHrNWaNACUPiQhLt7XI-fFFQoARSs1WgMDM Bug: 589228 Change-Id: Ib01e90b49924d7ba4e1dd03c8117eae9e21e795c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2081526 Commit-Queue: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org> Reviewed-by:Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#746482}
Showing
Please register or sign in to comment