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

Side by Side Diff: components/cryptauth/remote_device.cc

Issue 2915133002: Always initialize the are_beacon_seeds_loaded field of RemoteDevice. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « components/cryptauth/remote_device.h ('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 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
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
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
OLDNEW
« no previous file with comments | « components/cryptauth/remote_device.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698