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

Side by Side Diff: device/bluetooth/bluetooth_adapter_chromeos.cc

Issue 910433002: Fix crash on second failed connect to a paired device (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bugfix unit tests Created 5 years, 10 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/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
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
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
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_bluetooth_device_client.cc ('k') | device/bluetooth/bluetooth_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698