Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_device_bluez.h" | 5 #include "device/bluetooth/bluez/bluetooth_device_bluez.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 921 weak_ptr_factory_.GetWeakPtr())); | 921 weak_ptr_factory_.GetWeakPtr())); |
| 922 } | 922 } |
| 923 | 923 |
| 924 void BluetoothDeviceBlueZ::OnSetTrusted(bool success) { | 924 void BluetoothDeviceBlueZ::OnSetTrusted(bool success) { |
| 925 LOG_IF(WARNING, !success) << object_path_.value() | 925 LOG_IF(WARNING, !success) << object_path_.value() |
| 926 << ": Failed to set device as trusted"; | 926 << ": Failed to set device as trusted"; |
| 927 } | 927 } |
| 928 | 928 |
| 929 void BluetoothDeviceBlueZ::OnDisconnect(const base::Closure& callback) { | 929 void BluetoothDeviceBlueZ::OnDisconnect(const base::Closure& callback) { |
| 930 VLOG(1) << object_path_.value() << ": Disconnected"; | 930 VLOG(1) << object_path_.value() << ": Disconnected"; |
| 931 DidDisconnectGatt(false /* notifyDeviceChanged */); | |
|
scheib
2017/01/11 18:44:02
Why false here?
perja
2017/01/12 09:26:28
The bluez/dbus layer uses a property set (dbus::Pr
| |
| 931 callback.Run(); | 932 callback.Run(); |
| 932 } | 933 } |
| 933 | 934 |
| 934 void BluetoothDeviceBlueZ::OnDisconnectError( | 935 void BluetoothDeviceBlueZ::OnDisconnectError( |
| 935 const ErrorCallback& error_callback, | 936 const ErrorCallback& error_callback, |
| 936 const std::string& error_name, | 937 const std::string& error_name, |
| 937 const std::string& error_message) { | 938 const std::string& error_message) { |
| 938 LOG(WARNING) << object_path_.value() | 939 LOG(WARNING) << object_path_.value() |
| 939 << ": Failed to disconnect device: " << error_name << ": " | 940 << ": Failed to disconnect device: " << error_name << ": " |
| 940 << error_message; | 941 << error_message; |
| 941 error_callback.Run(); | 942 error_callback.Run(); |
| 942 } | 943 } |
| 943 | 944 |
| 944 void BluetoothDeviceBlueZ::OnForgetError(const ErrorCallback& error_callback, | 945 void BluetoothDeviceBlueZ::OnForgetError(const ErrorCallback& error_callback, |
| 945 const std::string& error_name, | 946 const std::string& error_name, |
| 946 const std::string& error_message) { | 947 const std::string& error_message) { |
| 947 LOG(WARNING) << object_path_.value() | 948 LOG(WARNING) << object_path_.value() |
| 948 << ": Failed to remove device: " << error_name << ": " | 949 << ": Failed to remove device: " << error_name << ": " |
| 949 << error_message; | 950 << error_message; |
| 950 error_callback.Run(); | 951 error_callback.Run(); |
| 951 } | 952 } |
| 952 | 953 |
| 953 } // namespace bluez | 954 } // namespace bluez |
| OLD | NEW |