diff options
author | youngki@chromium.org <youngki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-01 23:32:42 +0000 |
---|---|---|
committer | youngki@chromium.org <youngki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-01 23:32:42 +0000 |
commit | ec00099f34a3df350e87c81e8840ca15ee7a19dc (patch) | |
tree | 7d55f522ce91cb4fe099db7def58d1987f7a7b1e /device/bluetooth/bluetooth_profile.h | |
parent | af8fae78c93952c5bf1cfde0fc138ef245092add (diff) | |
download | chromium_src-ec00099f34a3df350e87c81e8840ca15ee7a19dc.zip chromium_src-ec00099f34a3df350e87c81e8840ca15ee7a19dc.tar.gz chromium_src-ec00099f34a3df350e87c81e8840ca15ee7a19dc.tar.bz2 |
Relanding addProfile/removeProfile patch with heapchecker fix.
This is a relanding of r197554 with heapchecker fix.
Some profile-dependent services depend on UI thread to clean up, so I had to add
UI message loop in bluetooth_event_router_unittest.cc to make sure that all the
objects are released at the end of test.
I verified with valgrind that this patch does not introduce any new memory leak.
BUG=229636
Review URL: https://chromiumcodereview.appspot.com/14569007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197741 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/bluetooth/bluetooth_profile.h')
-rw-r--r-- | device/bluetooth/bluetooth_profile.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/device/bluetooth/bluetooth_profile.h b/device/bluetooth/bluetooth_profile.h index 466bdf2..46200b3 100644 --- a/device/bluetooth/bluetooth_profile.h +++ b/device/bluetooth/bluetooth_profile.h @@ -12,8 +12,10 @@ namespace device { +class BluetoothDevice; class BluetoothProfileMac; class BluetoothSocket; +class MockBluetoothProfile; // BluetoothProfile represents an implementation of either a client or server // of a particular specified profile (aka service or protocol in other @@ -92,11 +94,14 @@ class BluetoothProfile { // The socket will be closed when all references are released; none of the // BluetoothProfile, or BluetoothAdapter or BluetoothDevice objects are // guaranteed to hold a reference so this may outlive all of them. - typedef base::Callback<void(scoped_refptr<BluetoothSocket>)> SocketCallback; - virtual void SetConnectionCallback(const SocketCallback& callback) = 0; + typedef base::Callback<void( + const BluetoothDevice*, + scoped_refptr<BluetoothSocket>)> ConnectionCallback; + virtual void SetConnectionCallback(const ConnectionCallback& callback) = 0; private: friend class BluetoothProfileMac; + friend class MockBluetoothProfile; BluetoothProfile(); virtual ~BluetoothProfile(); |