• David Lechner's avatar
    bluetooth: implement new WriteRemoteCharacteristic · 18bc783f
    David Lechner authored
    After deprecating the previous implementation, we need to create a new
    implementation that allows selecting write with or without response.
    
    The new implementation is simply a copy of the deprecated implementation
    with the following changes:
    
    - An enum WriteType parameter is added to select with or without
      response.
    - All GATT characteristic property checks are removed and the new enum
      parameter is used to select the write type instead.
    - Additional write flags parameters are added to the platform-specific
      backends as needed.
      - For most platforms, these are just bit flags/enums.
      - For BlueZ, this is a string.
      - On the "win" backend, the part that depends on the characteristic
        property was moved to the DeprecatedWriteRemoteCharacteristic
        method since it would otherwise interfere with the new
        implementation.
      - On the "cast" backend, we are able to use the existing WriteAuth
        method without additional modification.
    
    Likewise, the new unit tests are just a copy of the same unit tests that
    call the DeprecatedWriteRemoteCharacteristic method. The new tests have
    been modified to try to avoid using base::RunLoop::RunUntilIdle.
    
    Bug: 672648
    Change-Id: I7958d9e6d3fd285695091fe3220b3d2fce45c641
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2191232
    Commit-Queue: Reilly Grant <reillyg@chromium.org>
    Reviewed-by: default avatarVincent Scheib <scheib@chromium.org>
    Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#769949}
    18bc783f
bluetooth_task_manager_win.cc 39 KB