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

Side by Side Diff: device/bluetooth/test/mock_bluetooth_adapter.cc

Issue 1132943002: bluetooth: Move mock creation out of BluetoothDispatcherHost to LayoutTestBluetoothAdapterProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-testing-layout-tests
Patch Set: Changed new'ed variables to scoped_ptr. Created 5 years, 7 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/test/mock_bluetooth_adapter.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/test/mock_bluetooth_adapter.h" 5 #include "device/bluetooth/test/mock_bluetooth_adapter.h"
6 6
7 namespace device { 7 namespace device {
8 8
9 MockBluetoothAdapter::Observer::Observer() {} 9 MockBluetoothAdapter::Observer::Observer() {}
10 MockBluetoothAdapter::Observer::~Observer() {} 10 MockBluetoothAdapter::Observer::~Observer() {}
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 StartDiscoverySessionWithFilterRaw(discovery_filter.get(), callback, 45 StartDiscoverySessionWithFilterRaw(discovery_filter.get(), callback,
46 error_callback); 46 error_callback);
47 } 47 }
48 48
49 void MockBluetoothAdapter::RegisterAdvertisement( 49 void MockBluetoothAdapter::RegisterAdvertisement(
50 scoped_ptr<BluetoothAdvertisement::Data> advertisement_data, 50 scoped_ptr<BluetoothAdvertisement::Data> advertisement_data,
51 const CreateAdvertisementCallback& callback, 51 const CreateAdvertisementCallback& callback,
52 const CreateAdvertisementErrorCallback& error_callback) { 52 const CreateAdvertisementErrorCallback& error_callback) {
53 } 53 }
54 54
55 void MockBluetoothAdapter::AddMockDevice(
56 scoped_ptr<MockBluetoothDevice> mock_device) {
57 mock_devices_.push_back(mock_device.release());
Jeffrey Yasskin 2015/05/13 21:44:36 You could use .Pass() here, but it doesn't matter
ortuno 2015/05/13 22:12:35 Done.
58 }
59
60 BluetoothAdapter::ConstDeviceList MockBluetoothAdapter::GetMockDevices() {
61 BluetoothAdapter::ConstDeviceList devices;
62 for (ScopedVector<MockBluetoothDevice>::iterator it = mock_devices_.begin();
63 it != mock_devices_.end(); ++it) {
64 devices.push_back(*it);
65 }
66 return devices;
67 }
68
55 } // namespace device 69 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_adapter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698