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

Side by Side Diff: device/bluetooth/test/mock_bluetooth_gatt_service.cc

Issue 1149883011: bluetooth: Browser-side implementation of readValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-get-characteristic-initial
Patch Set: Fix merge conflicts Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/bluetooth/test/mock_bluetooth_gatt_service.h" 5 #include "device/bluetooth/test/mock_bluetooth_gatt_service.h"
6 6
7 #include "device/bluetooth/test/mock_bluetooth_device.h" 7 #include "device/bluetooth/test/mock_bluetooth_device.h"
8 8
9 using testing::Return; 9 using testing::Return;
10 using testing::_; 10 using testing::_;
(...skipping 29 matching lines...) Expand all
40 40
41 std::vector<BluetoothGattCharacteristic*> 41 std::vector<BluetoothGattCharacteristic*>
42 MockBluetoothGattService::GetMockCharacteristics() const { 42 MockBluetoothGattService::GetMockCharacteristics() const {
43 std::vector<BluetoothGattCharacteristic*> characteristics; 43 std::vector<BluetoothGattCharacteristic*> characteristics;
44 for (BluetoothGattCharacteristic* characteristic : mock_characteristics_) { 44 for (BluetoothGattCharacteristic* characteristic : mock_characteristics_) {
45 characteristics.push_back(characteristic); 45 characteristics.push_back(characteristic);
46 } 46 }
47 return characteristics; 47 return characteristics;
48 } 48 }
49 49
50 BluetoothGattCharacteristic* MockBluetoothGattService::GetMockCharacteristic(
51 const std::string& identifier) const {
52 for (BluetoothGattCharacteristic* characteristic : mock_characteristics_) {
53 if (characteristic->GetIdentifier() == identifier) {
54 return characteristic;
55 }
56 }
57 return nullptr;
58 }
59
50 } // namespace device 60 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_gatt_service.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698