Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: device/bluetooth/bluez/bluetooth_device_bluez.cc

Issue 2625013003: bluetooth: bluez: Fixed issue with missing notifications after reconnect. (Closed)
Patch Set: Added comment about the notification. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // Do not notify about changed device since this is already done by
932 // the dbus::PropertySet and the property change callback for BlueZ.
933 DidDisconnectGatt(false /* notifyDeviceChanged */);
931 callback.Run(); 934 callback.Run();
932 } 935 }
933 936
934 void BluetoothDeviceBlueZ::OnDisconnectError( 937 void BluetoothDeviceBlueZ::OnDisconnectError(
935 const ErrorCallback& error_callback, 938 const ErrorCallback& error_callback,
936 const std::string& error_name, 939 const std::string& error_name,
937 const std::string& error_message) { 940 const std::string& error_message) {
938 LOG(WARNING) << object_path_.value() 941 LOG(WARNING) << object_path_.value()
939 << ": Failed to disconnect device: " << error_name << ": " 942 << ": Failed to disconnect device: " << error_name << ": "
940 << error_message; 943 << error_message;
941 error_callback.Run(); 944 error_callback.Run();
942 } 945 }
943 946
944 void BluetoothDeviceBlueZ::OnForgetError(const ErrorCallback& error_callback, 947 void BluetoothDeviceBlueZ::OnForgetError(const ErrorCallback& error_callback,
945 const std::string& error_name, 948 const std::string& error_name,
946 const std::string& error_message) { 949 const std::string& error_message) {
947 LOG(WARNING) << object_path_.value() 950 LOG(WARNING) << object_path_.value()
948 << ": Failed to remove device: " << error_name << ": " 951 << ": Failed to remove device: " << error_name << ": "
949 << error_message; 952 << error_message;
950 error_callback.Run(); 953 error_callback.Run();
951 } 954 }
952 955
953 } // namespace bluez 956 } // namespace bluez
OLDNEW
« device/bluetooth/bluetooth_device.cc ('K') | « device/bluetooth/bluetooth_low_energy_device_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698