| 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/bluez/bluetooth_adapter_profile_bluez.h" | 5 #include "device/bluetooth/bluez/bluetooth_adapter_profile_bluez.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 unregistered_callback.Run(); | 105 unregistered_callback.Run(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 // bluez::BluetoothProfileServiceProvider::Delegate: | 108 // bluez::BluetoothProfileServiceProvider::Delegate: |
| 109 void BluetoothAdapterProfileBlueZ::Released() { | 109 void BluetoothAdapterProfileBlueZ::Released() { |
| 110 VLOG(1) << object_path_.value() << ": Release"; | 110 VLOG(1) << object_path_.value() << ": Release"; |
| 111 } | 111 } |
| 112 | 112 |
| 113 void BluetoothAdapterProfileBlueZ::NewConnection( | 113 void BluetoothAdapterProfileBlueZ::NewConnection( |
| 114 const dbus::ObjectPath& device_path, | 114 const dbus::ObjectPath& device_path, |
| 115 std::unique_ptr<dbus::FileDescriptor> fd, | 115 base::ScopedFD fd, |
| 116 const bluez::BluetoothProfileServiceProvider::Delegate::Options& options, | 116 const bluez::BluetoothProfileServiceProvider::Delegate::Options& options, |
| 117 const ConfirmationCallback& callback) { | 117 const ConfirmationCallback& callback) { |
| 118 dbus::ObjectPath delegate_path = device_path; | 118 dbus::ObjectPath delegate_path = device_path; |
| 119 | 119 |
| 120 if (delegates_.find(device_path.value()) == delegates_.end()) | 120 if (delegates_.find(device_path.value()) == delegates_.end()) |
| 121 delegate_path = dbus::ObjectPath(""); | 121 delegate_path = dbus::ObjectPath(""); |
| 122 | 122 |
| 123 if (delegates_.find(delegate_path.value()) == delegates_.end()) { | 123 if (delegates_.find(delegate_path.value()) == delegates_.end()) { |
| 124 VLOG(1) << object_path_.value() << ": New connection for device " | 124 VLOG(1) << object_path_.value() << ": New connection for device " |
| 125 << device_path.value() << " which has no delegates!"; | 125 << device_path.value() << " which has no delegates!"; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 153 // Cancel() should only go to a delegate accepting connections. | 153 // Cancel() should only go to a delegate accepting connections. |
| 154 if (delegates_.find("") == delegates_.end()) { | 154 if (delegates_.find("") == delegates_.end()) { |
| 155 VLOG(1) << object_path_.value() << ": Cancel with no delegate!"; | 155 VLOG(1) << object_path_.value() << ": Cancel with no delegate!"; |
| 156 return; | 156 return; |
| 157 } | 157 } |
| 158 | 158 |
| 159 delegates_[""]->Cancel(); | 159 delegates_[""]->Cancel(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 } // namespace bluez | 162 } // namespace bluez |
| OLD | NEW |