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

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

Issue 1150833002: bluetooth: android: Initial Low Energy Discovery Sessions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-manifest-
Patch Set: https://codereview.chromium.org/1231883004 fixs runtime error. Created 5 years, 5 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
« no previous file with comments | « device/bluetooth/test/bluetooth_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/test/bluetooth_test.cc
diff --git a/device/bluetooth/test/bluetooth_test.cc b/device/bluetooth/test/bluetooth_test.cc
index ca2b078cddc8a5082135088f410a7c8bbc5a8d89..e7c55144726e401cf629b1b2226380e2688bbf2e 100644
--- a/device/bluetooth/test/bluetooth_test.cc
+++ b/device/bluetooth/test/bluetooth_test.cc
@@ -4,6 +4,11 @@
#include "device/bluetooth/test/bluetooth_test.h"
+#include "base/bind.h"
+#include "base/logging.h"
+#include "base/run_loop.h"
+#include "device/bluetooth/bluetooth_adapter.h"
+
namespace device {
BluetoothTestBase::BluetoothTestBase() {
@@ -12,4 +17,32 @@ BluetoothTestBase::BluetoothTestBase() {
BluetoothTestBase::~BluetoothTestBase() {
}
+void BluetoothTestBase::Callback() {
+ ++callback_count_;
+}
+
+void BluetoothTestBase::DiscoverySessionCallback(
+ scoped_ptr<BluetoothDiscoverySession> discovery_session) {
+ ++callback_count_;
+ discovery_sessions_.push_back(discovery_session.release());
+}
+
+void BluetoothTestBase::ErrorCallback() {
+ ++error_callback_count_;
+}
+
+base::Closure BluetoothTestBase::GetCallback() {
+ return base::Bind(&BluetoothTestBase::Callback, base::Unretained(this));
+}
+
+BluetoothAdapter::DiscoverySessionCallback
+BluetoothTestBase::GetDiscoverySessionCallback() {
+ return base::Bind(&BluetoothTestBase::DiscoverySessionCallback,
+ base::Unretained(this));
+}
+
+BluetoothAdapter::ErrorCallback BluetoothTestBase::GetErrorCallback() {
+ return base::Bind(&BluetoothTestBase::ErrorCallback, base::Unretained(this));
+}
+
} // namespace device
« no previous file with comments | « device/bluetooth/test/bluetooth_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698