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

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

Issue 2377513004: bluetooth:android: Return the advertised name if advertising (Closed)
Patch Set: Format' Created 4 years, 1 month 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_mac.mm ('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 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 void BluetoothTestWin::StartLowEnergyDiscoverySession() { 124 void BluetoothTestWin::StartLowEnergyDiscoverySession() {
125 __super ::StartLowEnergyDiscoverySession(); 125 __super ::StartLowEnergyDiscoverySession();
126 FinishPendingTasks(); 126 FinishPendingTasks();
127 } 127 }
128 128
129 BluetoothDevice* BluetoothTestWin::SimulateLowEnergyDevice(int device_ordinal) { 129 BluetoothDevice* BluetoothTestWin::SimulateLowEnergyDevice(int device_ordinal) {
130 if (device_ordinal > 4 || device_ordinal < 1) 130 if (device_ordinal > 4 || device_ordinal < 1)
131 return nullptr; 131 return nullptr;
132 132
133 std::string device_name = kTestDeviceName; 133 std::string device_name = kTestDeviceGapName;
134 std::string device_address = kTestDeviceAddress1; 134 std::string device_address = kTestDeviceAddress1;
135 std::string service_uuid_1; 135 std::string service_uuid_1;
136 std::string service_uuid_2; 136 std::string service_uuid_2;
137 137
138 switch (device_ordinal) { 138 switch (device_ordinal) {
139 case 1: 139 case 1:
140 service_uuid_1 = kTestUUIDGenericAccess; 140 service_uuid_1 = kTestUUIDGenericAccess;
141 service_uuid_2 = kTestUUIDGenericAttribute; 141 service_uuid_2 = kTestUUIDGenericAttribute;
142 break; 142 break;
143 case 2: 143 case 2:
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 void BluetoothTestWin::ForceRefreshDevice() { 497 void BluetoothTestWin::ForceRefreshDevice() {
498 adapter_win_->force_update_device_for_test_ = true; 498 adapter_win_->force_update_device_for_test_ = true;
499 FinishPendingTasks(); 499 FinishPendingTasks();
500 } 500 }
501 501
502 void BluetoothTestWin::FinishPendingTasks() { 502 void BluetoothTestWin::FinishPendingTasks() {
503 bluetooth_task_runner_->RunPendingTasks(); 503 bluetooth_task_runner_->RunPendingTasks();
504 base::RunLoop().RunUntilIdle(); 504 base::RunLoop().RunUntilIdle();
505 } 505 }
506 } 506 }
OLDNEW
« no previous file with comments | « device/bluetooth/test/bluetooth_test_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698