OLD | NEW |
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 "chromeos/dbus/fake_bluetooth_gatt_service_client.h" | 5 #include "chromeos/dbus/fake_bluetooth_gatt_service_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "chromeos/dbus/dbus_thread_manager.h" | 10 #include "chromeos/dbus/dbus_thread_manager.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 void FakeBluetoothGattServiceClient::ExposeHeartRateCharacteristics() { | 175 void FakeBluetoothGattServiceClient::ExposeHeartRateCharacteristics() { |
176 if (!IsHeartRateVisible()) { | 176 if (!IsHeartRateVisible()) { |
177 VLOG(2) << "Heart Rate service not visible. Not exposing characteristics."; | 177 VLOG(2) << "Heart Rate service not visible. Not exposing characteristics."; |
178 return; | 178 return; |
179 } | 179 } |
180 FakeBluetoothGattCharacteristicClient* char_client = | 180 FakeBluetoothGattCharacteristicClient* char_client = |
181 static_cast<FakeBluetoothGattCharacteristicClient*>( | 181 static_cast<FakeBluetoothGattCharacteristicClient*>( |
182 DBusThreadManager::Get()->GetBluetoothGattCharacteristicClient()); | 182 DBusThreadManager::Get()->GetBluetoothGattCharacteristicClient()); |
183 char_client->ExposeHeartRateCharacteristics( | 183 char_client->ExposeHeartRateCharacteristics( |
184 dbus::ObjectPath(heart_rate_service_path_)); | 184 dbus::ObjectPath(heart_rate_service_path_)); |
| 185 |
| 186 std::vector<dbus::ObjectPath> char_paths; |
| 187 char_paths.push_back(char_client->GetHeartRateMeasurementPath()); |
| 188 char_paths.push_back(char_client->GetBodySensorLocationPath()); |
| 189 char_paths.push_back(char_client->GetHeartRateControlPointPath()); |
| 190 |
| 191 heart_rate_service_properties_->characteristics.ReplaceValue(char_paths); |
185 } | 192 } |
186 | 193 |
187 } // namespace chromeos | 194 } // namespace chromeos |
OLD | NEW |