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

Side by Side Diff: components/proximity_auth/proximity_auth_test_util.h

Issue 2560713002: Move RemoteDevice from //components/proximity_auth to //components/cryptauth so that it can be easi… (Closed)
Patch Set: Add cryptauth dependency. Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_TEST_UTIL_H 5 #ifndef COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_TEST_UTIL_H
6 #define COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_TEST_UTIL_H 6 #define COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_TEST_UTIL_H
7 7
8 #include "components/proximity_auth/remote_device.h" 8 #include "components/cryptauth/remote_device.h"
9 9
10 namespace proximity_auth { 10 namespace proximity_auth {
11 11
12 // Attributes of the default test remote device. 12 // Attributes of the default test remote device.
13 extern const char kTestRemoteDeviceUserId[]; 13 extern const char kTestRemoteDeviceUserId[];
14 extern const char kTestRemoteDeviceName[]; 14 extern const char kTestRemoteDeviceName[];
15 extern const char kTestRemoteDevicePublicKey[]; 15 extern const char kTestRemoteDevicePublicKey[];
16 extern const char kTestRemoteDeviceBluetoothAddress[]; 16 extern const char kTestRemoteDeviceBluetoothAddress[];
17 extern const char kTestRemoteDevicePSK[]; 17 extern const char kTestRemoteDevicePSK[];
18 extern const char kTestRemoteDeviceSignInChallenge[]; 18 extern const char kTestRemoteDeviceSignInChallenge[];
19 19
20 // Returns a BLE RemoteDevice used for tests. 20 // Returns a BLE RemoteDevice used for tests.
21 inline RemoteDevice CreateLERemoteDeviceForTest() { 21 inline cryptauth::RemoteDevice CreateLERemoteDeviceForTest() {
22 return RemoteDevice(kTestRemoteDeviceUserId, kTestRemoteDeviceName, 22 return cryptauth::RemoteDevice(
23 kTestRemoteDevicePublicKey, RemoteDevice::BLUETOOTH_LE, 23 kTestRemoteDeviceUserId, kTestRemoteDeviceName,
24 kTestRemoteDeviceBluetoothAddress, kTestRemoteDevicePSK, 24 kTestRemoteDevicePublicKey, cryptauth::RemoteDevice::BLUETOOTH_LE,
25 kTestRemoteDeviceSignInChallenge); 25 kTestRemoteDeviceBluetoothAddress, kTestRemoteDevicePSK,
26 kTestRemoteDeviceSignInChallenge);
26 } 27 }
27 28
28 // Returns a classic Bluetooth RemoteDevice used for tests. 29 // Returns a classic Bluetooth RemoteDevice used for tests.
29 inline RemoteDevice CreateClassicRemoteDeviceForTest() { 30 inline cryptauth::RemoteDevice CreateClassicRemoteDeviceForTest() {
30 return RemoteDevice(kTestRemoteDeviceUserId, kTestRemoteDeviceName, 31 return cryptauth::RemoteDevice(
31 kTestRemoteDevicePublicKey, 32 kTestRemoteDeviceUserId, kTestRemoteDeviceName,
32 RemoteDevice::BLUETOOTH_CLASSIC, 33 kTestRemoteDevicePublicKey, cryptauth::RemoteDevice::BLUETOOTH_CLASSIC,
33 kTestRemoteDeviceBluetoothAddress, kTestRemoteDevicePSK, 34 kTestRemoteDeviceBluetoothAddress, kTestRemoteDevicePSK,
34 kTestRemoteDeviceSignInChallenge); 35 kTestRemoteDeviceSignInChallenge);
35 } 36 }
36 37
37 } // namespace proximity_auth 38 } // namespace proximity_auth
38 39
39 #endif // COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_TEST_UTIL_H 40 #endif // COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_TEST_UTIL_H
OLDNEW
« no previous file with comments | « components/proximity_auth/proximity_auth_system_unittest.cc ('k') | components/proximity_auth/proximity_monitor_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698