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

Unified Diff: content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc

Issue 2059543002: bluetooth: Move FactoryWrapper to device and expose a function for testing in chooser controller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Fix typo Created 4 years, 6 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/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc
diff --git a/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc b/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc
index b97bd0ad07b50c6460f3cb5e1ea35e52cd51a6c7..90f40c68c2ce6155457495973885632deb913df7 100644
--- a/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc
+++ b/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc
@@ -8,23 +8,20 @@
#include "content/public/test/layouttest_support.h"
#include "content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h"
+#include "device/bluetooth/bluetooth_adapter_factory_wrapper.h"
namespace content {
// static
void LayoutTestBluetoothFakeAdapterSetterImpl::Create(
- int render_process_id,
mojom::LayoutTestBluetoothFakeAdapterSetterRequest request) {
- new LayoutTestBluetoothFakeAdapterSetterImpl(render_process_id,
- std::move(request));
+ new LayoutTestBluetoothFakeAdapterSetterImpl(std::move(request));
}
LayoutTestBluetoothFakeAdapterSetterImpl::
LayoutTestBluetoothFakeAdapterSetterImpl(
- int render_process_id,
mojom::LayoutTestBluetoothFakeAdapterSetterRequest request)
- : render_process_id_(render_process_id),
- binding_(this, std::move(request)) {}
+ : binding_(this, std::move(request)) {}
LayoutTestBluetoothFakeAdapterSetterImpl::
~LayoutTestBluetoothFakeAdapterSetterImpl() {}
@@ -32,9 +29,9 @@ LayoutTestBluetoothFakeAdapterSetterImpl::
void LayoutTestBluetoothFakeAdapterSetterImpl::Set(
const mojo::String& adapter_name,
const SetCallback& callback) {
- SetBluetoothAdapter(render_process_id_,
- LayoutTestBluetoothAdapterProvider::GetBluetoothAdapter(
- adapter_name));
+ device::BluetoothAdapterFactoryWrapper::Get().SetBluetoothAdapterForTesting(
+ LayoutTestBluetoothAdapterProvider::GetBluetoothAdapter(adapter_name));
+
callback.Run();
}

Powered by Google App Engine
This is Rietveld 408576698