OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/bluez/bluetooth_pairing_bluez.h" | 5 #include "device/bluetooth/bluez/bluetooth_pairing_bluez.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "device/bluetooth/bluetooth_device.h" | 9 #include "device/bluetooth/bluetooth_device.h" |
10 #include "device/bluetooth/bluez/bluetooth_device_bluez.h" | 10 #include "device/bluetooth/bluez/bluetooth_device_bluez.h" |
11 | 11 |
12 using device::BluetoothDevice; | 12 using device::BluetoothDevice; |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 // Histogram enumerations for pairing methods. | 16 // Histogram enumerations for pairing methods. |
17 enum UMAPairingMethod { | 17 enum UMAPairingMethod { |
18 UMA_PAIRING_METHOD_NONE, | 18 UMA_PAIRING_METHOD_NONE, |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 // If this is not an outgoing connection to the device, clean up the pairing | 263 // If this is not an outgoing connection to the device, clean up the pairing |
264 // context since the pairing is done. The outgoing connection case is cleaned | 264 // context since the pairing is done. The outgoing connection case is cleaned |
265 // up in the callback for the underlying Pair() call. | 265 // up in the callback for the underlying Pair() call. |
266 if (!device_->IsConnecting()) | 266 if (!device_->IsConnecting()) |
267 device_->EndPairing(); | 267 device_->EndPairing(); |
268 | 268 |
269 return callback_run; | 269 return callback_run; |
270 } | 270 } |
271 | 271 |
272 } // namespace bluez | 272 } // namespace bluez |
OLD | NEW |