Skip to content

Commit

Permalink
bluetooth: Remove test support for the non-WinRT low-energy backend
Browse files Browse the repository at this point in the history
The next change will remove support from Bluetooth Low Energy from
BluetoothAdapterWin. This change removes the support code from
BluetoothTestWin.

This code is unnecessary because the non-WinRT BLE backend was never
enabled by default and was only ever intended to support Windows 7 and
8, which are no longer supported by Chrome.

Bug: 1026925
Change-Id: Id81c970cffaa4d2c9a4a4fa191b2f65907bb26e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4265136
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Vincent Scheib <scheib@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Vincent Scheib <scheib@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1107094}
  • Loading branch information
reillyeon authored and Chromium LUCI CQ committed Feb 18, 2023
1 parent dfe05c9 commit b8b77ce
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 1,225 deletions.
2 changes: 0 additions & 2 deletions device/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,6 @@ test("device_unittests") {
sources += [
"bluetooth/bluetooth_classic_win_fake.cc",
"bluetooth/bluetooth_classic_win_fake.h",
"bluetooth/bluetooth_low_energy_win_fake.cc",
"bluetooth/bluetooth_low_energy_win_fake.h",
"bluetooth/test/fake_bluetooth_adapter_winrt.cc",
"bluetooth/test/fake_bluetooth_adapter_winrt.h",
"bluetooth/test/fake_bluetooth_le_advertisement_data_section_winrt.cc",
Expand Down
3 changes: 1 addition & 2 deletions device/bluetooth/bluetooth_adapter_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,14 @@ void BluetoothAdapterWin::Initialize(base::OnceClosure init_callback) {
void BluetoothAdapterWin::InitForTest(
base::OnceClosure init_callback,
std::unique_ptr<win::BluetoothClassicWrapper> classic_wrapper,
std::unique_ptr<win::BluetoothLowEnergyWrapper> le_wrapper,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
scoped_refptr<base::SequencedTaskRunner> bluetooth_task_runner) {
init_callback_ = std::move(init_callback);
ui_task_runner_ = ui_task_runner;
if (!ui_task_runner_)
ui_task_runner_ = base::SingleThreadTaskRunner::GetCurrentDefault();
task_manager_ = BluetoothTaskManagerWin::CreateForTesting(
std::move(classic_wrapper), std::move(le_wrapper), ui_task_runner_);
std::move(classic_wrapper), ui_task_runner_);
task_manager_->AddObserver(this);
task_manager_->InitializeWithBluetoothTaskRunner(bluetooth_task_runner);
}
Expand Down
1 change: 0 additions & 1 deletion device/bluetooth/bluetooth_adapter_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterWin
void InitForTest(
base::OnceClosure init_callback,
std::unique_ptr<win::BluetoothClassicWrapper> classic_wrapper,
std::unique_ptr<win::BluetoothLowEnergyWrapper> le_wrapper,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
scoped_refptr<base::SequencedTaskRunner> bluetooth_task_runner);

Expand Down
2 changes: 1 addition & 1 deletion device/bluetooth/bluetooth_adapter_win_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class BluetoothAdapterWinTest : public testing::Test {
adapter_win_->InitForTest(
base::BindOnce(&BluetoothAdapterWinTest::RunInitCallback,
base::Unretained(this)),
nullptr, nullptr, ui_task_runner_, bluetooth_task_runner_);
nullptr, ui_task_runner_, bluetooth_task_runner_);
}

void SetUp() override {
Expand Down

0 comments on commit b8b77ce

Please sign in to comment.