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

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

Issue 812673002: bluetooth: BluetoothAdapterDeleter used to control BluetoothAdapter destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: rebase Created 5 years, 11 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
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | device/bluetooth/bluetooth_adapter_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "device/bluetooth/bluetooth_adapter.h" 6 #include "device/bluetooth/bluetooth_adapter.h"
7 #include "device/bluetooth/bluetooth_device.h" 7 #include "device/bluetooth/bluetooth_device.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 using device::BluetoothAdapter; 10 using device::BluetoothAdapter;
(...skipping 29 matching lines...) Expand all
40 const ErrorCallback& error_callback) override {} 40 const ErrorCallback& error_callback) override {}
41 41
42 bool IsDiscoverable() const override { return false; } 42 bool IsDiscoverable() const override { return false; }
43 43
44 void SetDiscoverable(bool discoverable, 44 void SetDiscoverable(bool discoverable,
45 const base::Closure& callback, 45 const base::Closure& callback,
46 const ErrorCallback& error_callback) override {} 46 const ErrorCallback& error_callback) override {}
47 47
48 bool IsDiscovering() const override { return false; } 48 bool IsDiscovering() const override { return false; }
49 49
50 void DeleteOnCorrectThread() const override { delete this; }
51
50 void StartDiscoverySession(const DiscoverySessionCallback& callback, 52 void StartDiscoverySession(const DiscoverySessionCallback& callback,
51 const ErrorCallback& error_callback) override {} 53 const ErrorCallback& error_callback) override {}
52 54
53 void CreateRfcommService( 55 void CreateRfcommService(
54 const BluetoothUUID& uuid, 56 const BluetoothUUID& uuid,
55 const ServiceOptions& options, 57 const ServiceOptions& options,
56 const CreateServiceCallback& callback, 58 const CreateServiceCallback& callback,
57 const CreateServiceErrorCallback& error_callback) override {} 59 const CreateServiceErrorCallback& error_callback) override {}
58 60
59 void CreateL2capService( 61 void CreateL2capService(
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 TestPairingDelegate delegate; 151 TestPairingDelegate delegate;
150 152
151 adapter->AddPairingDelegate(&delegate, 153 adapter->AddPairingDelegate(&delegate,
152 BluetoothAdapter::PAIRING_DELEGATE_PRIORITY_LOW); 154 BluetoothAdapter::PAIRING_DELEGATE_PRIORITY_LOW);
153 adapter->RemovePairingDelegate(&delegate); 155 adapter->RemovePairingDelegate(&delegate);
154 156
155 EXPECT_TRUE(adapter->DefaultPairingDelegate() == NULL); 157 EXPECT_TRUE(adapter->DefaultPairingDelegate() == NULL);
156 } 158 }
157 159
158 } // namespace device 160 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | device/bluetooth/bluetooth_adapter_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698