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

Side by Side Diff: device/bluetooth/test/bluetooth_test_win.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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/bluetooth_test_win.h" 5 #include "device/bluetooth/test/bluetooth_test_win.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 if (!service_uuid_2.empty()) { 164 if (!service_uuid_2.empty()) {
165 fake_bt_le_wrapper_->SimulateGattService( 165 fake_bt_le_wrapper_->SimulateGattService(
166 simulated_device, nullptr, 166 simulated_device, nullptr,
167 CanonicalStringToBTH_LE_UUID(service_uuid_2)); 167 CanonicalStringToBTH_LE_UUID(service_uuid_2));
168 } 168 }
169 } 169 }
170 FinishPendingTasks(); 170 FinishPendingTasks();
171 171
172 std::vector<BluetoothDevice*> devices = adapter_win_->GetDevices(); 172 std::vector<BluetoothDevice*> devices = adapter_win_->GetDevices();
173 for (auto device : devices) { 173 for (auto* device : devices) {
174 if (device->GetAddress() == device_address) 174 if (device->GetAddress() == device_address)
175 return device; 175 return device;
176 } 176 }
177 177
178 return nullptr; 178 return nullptr;
179 } 179 }
180 180
181 void BluetoothTestWin::SimulateGattConnection(BluetoothDevice* device) { 181 void BluetoothTestWin::SimulateGattConnection(BluetoothDevice* device) {
182 FinishPendingTasks(); 182 FinishPendingTasks();
183 183
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 void BluetoothTestWin::ForceRefreshDevice() { 498 void BluetoothTestWin::ForceRefreshDevice() {
499 adapter_win_->force_update_device_for_test_ = true; 499 adapter_win_->force_update_device_for_test_ = true;
500 FinishPendingTasks(); 500 FinishPendingTasks();
501 } 501 }
502 502
503 void BluetoothTestWin::FinishPendingTasks() { 503 void BluetoothTestWin::FinishPendingTasks() {
504 bluetooth_task_runner_->RunPendingTasks(); 504 bluetooth_task_runner_->RunPendingTasks();
505 base::RunLoop().RunUntilIdle(); 505 base::RunLoop().RunUntilIdle();
506 } 506 }
507 } 507 }
OLDNEW
« no previous file with comments | « device/bluetooth/test/bluetooth_test_android.cc ('k') | device/bluetooth/test/mock_bluetooth_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698