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

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

Issue 935383003: Fix BluetoothAdapterProfileChromeOS lifecycle management (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698