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

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

Issue 2108923002: device: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: device Created 4 years, 5 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/bluetooth_test_win.cc ('k') | device/usb/usb_device.cc » ('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 (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 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 error_callback); 61 error_callback);
62 } 62 }
63 63
64 void MockBluetoothAdapter::AddMockDevice( 64 void MockBluetoothAdapter::AddMockDevice(
65 std::unique_ptr<MockBluetoothDevice> mock_device) { 65 std::unique_ptr<MockBluetoothDevice> mock_device) {
66 mock_devices_.push_back(std::move(mock_device)); 66 mock_devices_.push_back(std::move(mock_device));
67 } 67 }
68 68
69 BluetoothAdapter::ConstDeviceList MockBluetoothAdapter::GetConstMockDevices() { 69 BluetoothAdapter::ConstDeviceList MockBluetoothAdapter::GetConstMockDevices() {
70 BluetoothAdapter::ConstDeviceList devices; 70 BluetoothAdapter::ConstDeviceList devices;
71 for (auto& it : mock_devices_) { 71 for (auto* it : mock_devices_) {
72 devices.push_back(it); 72 devices.push_back(it);
73 } 73 }
74 return devices; 74 return devices;
75 } 75 }
76 76
77 BluetoothAdapter::DeviceList MockBluetoothAdapter::GetMockDevices() { 77 BluetoothAdapter::DeviceList MockBluetoothAdapter::GetMockDevices() {
78 BluetoothAdapter::DeviceList devices; 78 BluetoothAdapter::DeviceList devices;
79 for (auto& it : mock_devices_) { 79 for (auto* it : mock_devices_) {
80 devices.push_back(it); 80 devices.push_back(it);
81 } 81 }
82 return devices; 82 return devices;
83 } 83 }
84 84
85 void MockBluetoothAdapter::RegisterAdvertisement( 85 void MockBluetoothAdapter::RegisterAdvertisement(
86 std::unique_ptr<BluetoothAdvertisement::Data> advertisement_data, 86 std::unique_ptr<BluetoothAdvertisement::Data> advertisement_data,
87 const CreateAdvertisementCallback& callback, 87 const CreateAdvertisementCallback& callback,
88 const CreateAdvertisementErrorCallback& error_callback) { 88 const CreateAdvertisementErrorCallback& error_callback) {
89 callback.Run(new MockBluetoothAdvertisement); 89 callback.Run(new MockBluetoothAdvertisement);
90 } 90 }
91 91
92 } // namespace device 92 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/test/bluetooth_test_win.cc ('k') | device/usb/usb_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698