| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/bluetooth_test.h" | 5 #include "device/bluetooth/test/bluetooth_test.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 const std::string BluetoothTestBase::kTestDeviceNameEmpty = ""; | 22 const std::string BluetoothTestBase::kTestDeviceNameEmpty = ""; |
| 23 | 23 |
| 24 const std::string BluetoothTestBase::kTestDeviceAddress1 = "01:00:00:90:1E:BE"; | 24 const std::string BluetoothTestBase::kTestDeviceAddress1 = "01:00:00:90:1E:BE"; |
| 25 const std::string BluetoothTestBase::kTestDeviceAddress2 = "02:00:00:8B:74:63"; | 25 const std::string BluetoothTestBase::kTestDeviceAddress2 = "02:00:00:8B:74:63"; |
| 26 const std::string BluetoothTestBase::kTestDeviceAddress3 = "03:00:00:17:C0:57"; | 26 const std::string BluetoothTestBase::kTestDeviceAddress3 = "03:00:00:17:C0:57"; |
| 27 | 27 |
| 28 const std::string BluetoothTestBase::kTestUUIDGenericAccess = "1800"; | 28 const std::string BluetoothTestBase::kTestUUIDGenericAccess = "1800"; |
| 29 const std::string BluetoothTestBase::kTestUUIDGenericAttribute = "1801"; | 29 const std::string BluetoothTestBase::kTestUUIDGenericAttribute = "1801"; |
| 30 const std::string BluetoothTestBase::kTestUUIDImmediateAlert = "1802"; | 30 const std::string BluetoothTestBase::kTestUUIDImmediateAlert = "1802"; |
| 31 const std::string BluetoothTestBase::kTestUUIDLinkLoss = "1803"; | 31 const std::string BluetoothTestBase::kTestUUIDLinkLoss = "1803"; |
| 32 const std::string BluetoothTestBase::kTestUUIDHeartRate = "180d"; |
| 32 | 33 |
| 33 BluetoothTestBase::BluetoothTestBase() : weak_factory_(this) {} | 34 BluetoothTestBase::BluetoothTestBase() : weak_factory_(this) {} |
| 34 | 35 |
| 35 BluetoothTestBase::~BluetoothTestBase() { | 36 BluetoothTestBase::~BluetoothTestBase() { |
| 36 } | 37 } |
| 37 | 38 |
| 38 void BluetoothTestBase::StartLowEnergyDiscoverySession() { | 39 void BluetoothTestBase::StartLowEnergyDiscoverySession() { |
| 39 adapter_->StartDiscoverySessionWithFilter( | 40 adapter_->StartDiscoverySessionWithFilter( |
| 40 base::WrapUnique(new BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_LE)), | 41 base::WrapUnique(new BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_LE)), |
| 41 GetDiscoverySessionCallback(Call::EXPECTED), | 42 GetDiscoverySessionCallback(Call::EXPECTED), |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 gatt_write_characteristic_attempts_ = 0; | 374 gatt_write_characteristic_attempts_ = 0; |
| 374 gatt_read_descriptor_attempts_ = 0; | 375 gatt_read_descriptor_attempts_ = 0; |
| 375 gatt_write_descriptor_attempts_ = 0; | 376 gatt_write_descriptor_attempts_ = 0; |
| 376 } | 377 } |
| 377 | 378 |
| 378 void BluetoothTestBase::RemoveTimedOutDevices() { | 379 void BluetoothTestBase::RemoveTimedOutDevices() { |
| 379 adapter_->RemoveTimedOutDevices(); | 380 adapter_->RemoveTimedOutDevices(); |
| 380 } | 381 } |
| 381 | 382 |
| 382 } // namespace device | 383 } // namespace device |
| OLD | NEW |