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/bluetooth_adapter_chromeos.h" | 5 #include "device/bluetooth/bluetooth_adapter_chromeos.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 | 1005 |
1006 void BluetoothAdapterChromeOS::OnRegisterProfileError( | 1006 void BluetoothAdapterChromeOS::OnRegisterProfileError( |
1007 const BluetoothUUID& uuid, | 1007 const BluetoothUUID& uuid, |
1008 const ErrorCompletionCallback& error_callback, | 1008 const ErrorCompletionCallback& error_callback, |
1009 const std::string& error_name, | 1009 const std::string& error_name, |
1010 const std::string& error_message) { | 1010 const std::string& error_message) { |
1011 LOG(WARNING) << object_path_.value() | 1011 LOG(WARNING) << object_path_.value() |
1012 << ": Failed to register profile: " << error_name << ": " | 1012 << ": Failed to register profile: " << error_name << ": " |
1013 << error_message; | 1013 << error_message; |
1014 error_callback.Run(error_message); | 1014 error_callback.Run(error_message); |
1015 delete profiles_[uuid]; | 1015 ReleaseProfile(uuid); |
1016 profiles_.erase(uuid); | |
1017 } | 1016 } |
1018 | 1017 |
1019 void BluetoothAdapterChromeOS::OnSetDiscoverable( | 1018 void BluetoothAdapterChromeOS::OnSetDiscoverable( |
1020 const base::Closure& callback, | 1019 const base::Closure& callback, |
1021 const ErrorCallback& error_callback, | 1020 const ErrorCallback& error_callback, |
1022 bool success) { | 1021 bool success) { |
1023 DCHECK(IsPresent()); | 1022 DCHECK(IsPresent()); |
1024 // Set the discoverable_timeout property to zero so the adapter remains | 1023 // Set the discoverable_timeout property to zero so the adapter remains |
1025 // discoverable forever. | 1024 // discoverable forever. |
1026 DBusThreadManager::Get()->GetBluetoothAdapterClient()-> | 1025 DBusThreadManager::Get()->GetBluetoothAdapterClient()-> |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1218 | 1217 |
1219 // If the queued request resulted in a pending call, then let it | 1218 // If the queued request resulted in a pending call, then let it |
1220 // asynchonously process the remaining queued requests once the pending | 1219 // asynchonously process the remaining queued requests once the pending |
1221 // call returns. | 1220 // call returns. |
1222 if (discovery_request_pending_) | 1221 if (discovery_request_pending_) |
1223 return; | 1222 return; |
1224 } | 1223 } |
1225 } | 1224 } |
1226 | 1225 |
1227 } // namespace chromeos | 1226 } // namespace chromeos |
OLD | NEW |