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

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

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 | « no previous file | components/cryptauth/remote_device.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | components/cryptauth/remote_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698