| 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 "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h
" | 5 #include "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h
" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 using device::BluetoothDiscoveryFilter; | 30 using device::BluetoothDiscoveryFilter; |
| 31 | 31 |
| 32 namespace proximity_auth { | 32 namespace proximity_auth { |
| 33 namespace { | 33 namespace { |
| 34 const int kMinDiscoveryRSSI = -90; | 34 const int kMinDiscoveryRSSI = -90; |
| 35 } // namespace | 35 } // namespace |
| 36 | 36 |
| 37 class BluetoothThrottler; | 37 class BluetoothThrottler; |
| 38 | 38 |
| 39 BluetoothLowEnergyConnectionFinder::BluetoothLowEnergyConnectionFinder( | 39 BluetoothLowEnergyConnectionFinder::BluetoothLowEnergyConnectionFinder( |
| 40 const RemoteDevice remote_device, | 40 const cryptauth::RemoteDevice remote_device, |
| 41 const std::string& remote_service_uuid, | 41 const std::string& remote_service_uuid, |
| 42 FinderStrategy finder_strategy, | 42 FinderStrategy finder_strategy, |
| 43 const BluetoothLowEnergyDeviceWhitelist* device_whitelist, | 43 const BluetoothLowEnergyDeviceWhitelist* device_whitelist, |
| 44 BluetoothThrottler* bluetooth_throttler, | 44 BluetoothThrottler* bluetooth_throttler, |
| 45 int max_number_of_tries) | 45 int max_number_of_tries) |
| 46 : remote_device_(remote_device), | 46 : remote_device_(remote_device), |
| 47 remote_service_uuid_(device::BluetoothUUID(remote_service_uuid)), | 47 remote_service_uuid_(device::BluetoothUUID(remote_service_uuid)), |
| 48 finder_strategy_(finder_strategy), | 48 finder_strategy_(finder_strategy), |
| 49 device_whitelist_(device_whitelist), | 49 device_whitelist_(device_whitelist), |
| 50 bluetooth_throttler_(bluetooth_throttler), | 50 bluetooth_throttler_(bluetooth_throttler), |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 return device; | 309 return device; |
| 310 } | 310 } |
| 311 return nullptr; | 311 return nullptr; |
| 312 } | 312 } |
| 313 | 313 |
| 314 void BluetoothLowEnergyConnectionFinder::InvokeCallbackAsync() { | 314 void BluetoothLowEnergyConnectionFinder::InvokeCallbackAsync() { |
| 315 connection_callback_.Run(std::move(connection_)); | 315 connection_callback_.Run(std::move(connection_)); |
| 316 } | 316 } |
| 317 | 317 |
| 318 } // namespace proximity_auth | 318 } // namespace proximity_auth |
| OLD | NEW |