| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CRYPTAUTH_REMOTE_DEVICE_H_ | 5 #ifndef COMPONENTS_CRYPTAUTH_REMOTE_DEVICE_H_ |
| 6 #define COMPONENTS_CRYPTAUTH_REMOTE_DEVICE_H_ | 6 #define COMPONENTS_CRYPTAUTH_REMOTE_DEVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "components/cryptauth/proto/cryptauth_api.pb.h" | 11 #include "components/cryptauth/proto/cryptauth_api.pb.h" |
| 12 | 12 |
| 13 namespace cryptauth { | 13 namespace cryptauth { |
| 14 | 14 |
| 15 struct RemoteDevice { | 15 struct RemoteDevice { |
| 16 public: | 16 public: |
| 17 std::string user_id; | 17 std::string user_id; |
| 18 std::string name; | 18 std::string name; |
| 19 std::string public_key; | 19 std::string public_key; |
| 20 std::string bluetooth_address; | 20 std::string bluetooth_address; |
| 21 std::string persistent_symmetric_key; | 21 std::string persistent_symmetric_key; |
| 22 std::string sign_in_challenge; | 22 std::string sign_in_challenge; |
| 23 | 23 |
| 24 // Note: To save space, the BeaconSeeds may not necessarily be included in | 24 // Note: To save space, the BeaconSeeds may not necessarily be included in |
| 25 // this object. | 25 // this object. |
| 26 bool are_beacon_seeds_loaded; | 26 bool are_beacon_seeds_loaded = false; |
| 27 std::vector<BeaconSeed> beacon_seeds; | 27 std::vector<BeaconSeed> beacon_seeds; |
| 28 | 28 |
| 29 RemoteDevice(); | 29 RemoteDevice(); |
| 30 RemoteDevice(const std::string& user_id, | 30 RemoteDevice(const std::string& user_id, |
| 31 const std::string& name, | 31 const std::string& name, |
| 32 const std::string& public_key, | 32 const std::string& public_key, |
| 33 const std::string& bluetooth_address, | 33 const std::string& bluetooth_address, |
| 34 const std::string& persistent_symmetric_key, | 34 const std::string& persistent_symmetric_key, |
| 35 std::string sign_in_challenge); | 35 std::string sign_in_challenge); |
| 36 RemoteDevice(const RemoteDevice& other); | 36 RemoteDevice(const RemoteDevice& other); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 55 | 55 |
| 56 // Static method for truncated device ID for logs. | 56 // Static method for truncated device ID for logs. |
| 57 static std::string TruncateDeviceIdForLogs(const std::string& full_id); | 57 static std::string TruncateDeviceIdForLogs(const std::string& full_id); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 typedef std::vector<RemoteDevice> RemoteDeviceList; | 60 typedef std::vector<RemoteDevice> RemoteDeviceList; |
| 61 | 61 |
| 62 } // namespace cryptauth | 62 } // namespace cryptauth |
| 63 | 63 |
| 64 #endif // COMPONENTS_CRYPTAUTH_REMOTE_DEVICE_H_ | 64 #endif // COMPONENTS_CRYPTAUTH_REMOTE_DEVICE_H_ |
| OLD | NEW |