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

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

Issue 2326913003: Privatize StrongBinding lifetime management (Closed)
Patch Set: rebase Created 4 years, 3 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 8713514fb84cb1d0a16998fb188a6ae07c412464..31f6fc1fcec65e59662e12079de60f0321aaf8f6 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
@@ -9,23 +9,24 @@
#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"
+#include "mojo/public/cpp/bindings/strong_binding.h"
namespace content {
-// static
-void LayoutTestBluetoothFakeAdapterSetterImpl::Create(
- mojom::LayoutTestBluetoothFakeAdapterSetterRequest request) {
- new LayoutTestBluetoothFakeAdapterSetterImpl(std::move(request));
-}
-
LayoutTestBluetoothFakeAdapterSetterImpl::
- LayoutTestBluetoothFakeAdapterSetterImpl(
- mojom::LayoutTestBluetoothFakeAdapterSetterRequest request)
- : binding_(this, std::move(request)) {}
+ LayoutTestBluetoothFakeAdapterSetterImpl() {}
LayoutTestBluetoothFakeAdapterSetterImpl::
~LayoutTestBluetoothFakeAdapterSetterImpl() {}
+// static
+void LayoutTestBluetoothFakeAdapterSetterImpl::Create(
+ mojom::LayoutTestBluetoothFakeAdapterSetterRequest request) {
+ mojo::MakeStrongBinding(
+ base::MakeUnique<LayoutTestBluetoothFakeAdapterSetterImpl>(),
+ std::move(request));
+}
+
void LayoutTestBluetoothFakeAdapterSetterImpl::Set(
const std::string& adapter_name,
const SetCallback& callback) {

Powered by Google App Engine
This is Rietveld 408576698