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

Unified Diff: device/bluetooth/test/device_connection_helper.cc

Issue 2448713002: bluetooth: Add Device connection logic and accompanying user interface. (Closed)
Patch Set: Fix comments, add ConnectionStatus enum, other fixes Created 4 years, 1 month 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: 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

Powered by Google App Engine
This is Rietveld 408576698