| 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_socket_chromeos.h" | 5 #include "device/bluetooth/bluetooth_socket_chromeos.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 | 551 |
| 552 profile_->RemoveDelegate( | 552 profile_->RemoveDelegate( |
| 553 device_path_, | 553 device_path_, |
| 554 base::Bind(&BluetoothSocketChromeOS::ReleaseProfile, this, profile_)); | 554 base::Bind(&BluetoothSocketChromeOS::ReleaseProfile, this, profile_)); |
| 555 | 555 |
| 556 profile_ = nullptr; | 556 profile_ = nullptr; |
| 557 } | 557 } |
| 558 | 558 |
| 559 void BluetoothSocketChromeOS::ReleaseProfile( | 559 void BluetoothSocketChromeOS::ReleaseProfile( |
| 560 BluetoothAdapterProfileChromeOS* profile) { | 560 BluetoothAdapterProfileChromeOS* profile) { |
| 561 if (adapter_) | 561 delete profile; |
| 562 static_cast<BluetoothAdapterChromeOS*>(adapter_.get()) | |
| 563 ->ReleaseProfile(uuid_); | |
| 564 else | |
| 565 delete profile; | |
| 566 } | 562 } |
| 567 | 563 |
| 568 } // namespace chromeos | 564 } // namespace chromeos |
| OLD | NEW |