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

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

Issue 2244693002: bluetooth: Refactor how we update based on Advertising Data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix arc Created 4 years, 4 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 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
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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 gatt_write_characteristic_attempts_ = 0; 325 gatt_write_characteristic_attempts_ = 0;
325 gatt_read_descriptor_attempts_ = 0; 326 gatt_read_descriptor_attempts_ = 0;
326 gatt_write_descriptor_attempts_ = 0; 327 gatt_write_descriptor_attempts_ = 0;
327 } 328 }
328 329
329 void BluetoothTestBase::RemoveTimedOutDevices() { 330 void BluetoothTestBase::RemoveTimedOutDevices() {
330 adapter_->RemoveTimedOutDevices(); 331 adapter_->RemoveTimedOutDevices();
331 } 332 }
332 333
333 } // namespace device 334 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698