| OLD | NEW |
| 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 #include "components/cryptauth/remote_device.h" | 5 #include "components/cryptauth/remote_device.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 | 8 |
| 9 namespace cryptauth { | 9 namespace cryptauth { |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 const std::string& name, | 38 const std::string& name, |
| 39 const std::string& public_key, | 39 const std::string& public_key, |
| 40 const std::string& bluetooth_address, | 40 const std::string& bluetooth_address, |
| 41 const std::string& persistent_symmetric_key, | 41 const std::string& persistent_symmetric_key, |
| 42 std::string sign_in_challenge) | 42 std::string sign_in_challenge) |
| 43 : user_id(user_id), | 43 : user_id(user_id), |
| 44 name(name), | 44 name(name), |
| 45 public_key(public_key), | 45 public_key(public_key), |
| 46 bluetooth_address(bluetooth_address), | 46 bluetooth_address(bluetooth_address), |
| 47 persistent_symmetric_key(persistent_symmetric_key), | 47 persistent_symmetric_key(persistent_symmetric_key), |
| 48 sign_in_challenge(sign_in_challenge), | 48 sign_in_challenge(sign_in_challenge) {} |
| 49 are_beacon_seeds_loaded(false) {} | |
| 50 | 49 |
| 51 RemoteDevice::RemoteDevice(const RemoteDevice& other) = default; | 50 RemoteDevice::RemoteDevice(const RemoteDevice& other) = default; |
| 52 | 51 |
| 53 RemoteDevice::~RemoteDevice() {} | 52 RemoteDevice::~RemoteDevice() {} |
| 54 | 53 |
| 55 void RemoteDevice::LoadBeaconSeeds( | 54 void RemoteDevice::LoadBeaconSeeds( |
| 56 const std::vector<BeaconSeed>& beacon_seeds) { | 55 const std::vector<BeaconSeed>& beacon_seeds) { |
| 57 this->are_beacon_seeds_loaded = true; | 56 this->are_beacon_seeds_loaded = true; |
| 58 this->beacon_seeds = beacon_seeds; | 57 this->beacon_seeds = beacon_seeds; |
| 59 } | 58 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 if (full_id.length() <= 10) { | 97 if (full_id.length() <= 10) { |
| 99 return full_id; | 98 return full_id; |
| 100 } | 99 } |
| 101 | 100 |
| 102 return full_id.substr(0, 5) | 101 return full_id.substr(0, 5) |
| 103 + "..." | 102 + "..." |
| 104 + full_id.substr(full_id.length() - 5, full_id.length()); | 103 + full_id.substr(full_id.length() - 5, full_id.length()); |
| 105 } | 104 } |
| 106 | 105 |
| 107 } // namespace cryptauth | 106 } // namespace cryptauth |
| OLD | NEW |