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

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

Issue 1159523002: bluetooth: Browser side partial implementation of getPrimaryService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove anonymous namespace Created 5 years, 7 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/mock_bluetooth_device.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/mock_bluetooth_device.cc
diff --git a/device/bluetooth/test/mock_bluetooth_device.cc b/device/bluetooth/test/mock_bluetooth_device.cc
index 5235d5b3b01c8b8a3dad312cbc38cd520ce6c516..928d98cb2939f541d77cc956268c02941a99df3d 100644
--- a/device/bluetooth/test/mock_bluetooth_device.cc
+++ b/device/bluetooth/test/mock_bluetooth_device.cc
@@ -5,6 +5,7 @@
#include "device/bluetooth/test/mock_bluetooth_device.h"
#include "base/strings/utf_string_conversions.h"
+#include "device/bluetooth/bluetooth_gatt_service.h"
#include "device/bluetooth/test/mock_bluetooth_adapter.h"
namespace device {
@@ -56,4 +57,18 @@ MockBluetoothDevice::MockBluetoothDevice(MockBluetoothAdapter* adapter,
MockBluetoothDevice::~MockBluetoothDevice() {}
+void MockBluetoothDevice::AddMockService(
+ scoped_ptr<MockBluetoothGattService> mock_service) {
+ mock_services_.push_back(mock_service.Pass());
+}
+
+std::vector<BluetoothGattService*> MockBluetoothDevice::GetMockServices()
+ const {
+ std::vector<BluetoothGattService*> services;
+ for (BluetoothGattService* service : mock_services_) {
+ services.push_back(service);
+ }
+ return services;
+}
+
} // namespace device
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_device.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698