| Index: device/bluetooth/test/device_connection_helper.cc
|
| diff --git a/device/bluetooth/test/device_connection_helper.cc b/device/bluetooth/test/device_connection_helper.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fa7991057059b431d2ddddd46d7332cc70cd4a8b
|
| --- /dev/null
|
| +++ b/device/bluetooth/test/device_connection_helper.cc
|
| @@ -0,0 +1,21 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "device/bluetooth/test/device_connection_helper.h"
|
| +
|
| +namespace bluetooth {
|
| +DeviceConnectionHelper::DeviceConnectionHelper(
|
| + mojo::Binding<mojom::Device>* binding)
|
| + : callback_ran_(false), binding_(binding) {}
|
| +
|
| +DeviceConnectionHelper::~DeviceConnectionHelper() {
|
| + if (!callback_ran_) {
|
| + DCHECK(!binding_->is_bound());
|
| + }
|
| +}
|
| +
|
| +void DeviceConnectionHelper::SetCallbackRan(bool callback_ran) {
|
| + callback_ran_ = callback_ran;
|
| +}
|
| +} // namespace bluetooth
|
|
|