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.h" | 5 #include "components/proximity_auth/ble/bluetooth_low_energy_connection.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/task_runner.h" | 13 #include "base/task_runner.h" |
14 #include "base/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "components/proximity_auth/ble/bluetooth_low_energy_characteristics_fin
der.h" | 16 #include "components/proximity_auth/ble/bluetooth_low_energy_characteristics_fin
der.h" |
17 #include "components/proximity_auth/ble/fake_wire_message.h" | 17 #include "components/proximity_auth/ble/fake_wire_message.h" |
18 #include "components/proximity_auth/bluetooth_throttler.h" | 18 #include "components/proximity_auth/bluetooth_throttler.h" |
19 #include "components/proximity_auth/connection_finder.h" | 19 #include "components/proximity_auth/connection_finder.h" |
20 #include "components/proximity_auth/logging/logging.h" | 20 #include "components/proximity_auth/logging/logging.h" |
21 #include "components/proximity_auth/wire_message.h" | 21 #include "components/proximity_auth/wire_message.h" |
22 #include "device/bluetooth/bluetooth_adapter.h" | 22 #include "device/bluetooth/bluetooth_adapter.h" |
23 #include "device/bluetooth/bluetooth_device.h" | 23 #include "device/bluetooth/bluetooth_device.h" |
24 #include "device/bluetooth/bluetooth_gatt_connection.h" | 24 #include "device/bluetooth/bluetooth_gatt_connection.h" |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 const uint32_t value) { | 609 const uint32_t value) { |
610 std::vector<uint8_t> bytes(4, 0); | 610 std::vector<uint8_t> bytes(4, 0); |
611 bytes[0] = static_cast<uint8_t>(value); | 611 bytes[0] = static_cast<uint8_t>(value); |
612 bytes[1] = static_cast<uint8_t>(value >> 8); | 612 bytes[1] = static_cast<uint8_t>(value >> 8); |
613 bytes[2] = static_cast<uint8_t>(value >> 16); | 613 bytes[2] = static_cast<uint8_t>(value >> 16); |
614 bytes[3] = static_cast<uint8_t>(value >> 24); | 614 bytes[3] = static_cast<uint8_t>(value >> 24); |
615 return bytes; | 615 return bytes; |
616 } | 616 } |
617 | 617 |
618 } // namespace proximity_auth | 618 } // namespace proximity_auth |
OLD | NEW |