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

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

Issue 2859053003: [EasyUnlock] Add beacon_seeds to RemoteDevice. (Closed)
Patch Set: [EasyUnlock] Add beacon_seeds to RemoteDevice. Created 3 years, 7 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
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"
12
11 namespace cryptauth { 13 namespace cryptauth {
12 14
13 struct RemoteDevice { 15 struct RemoteDevice {
Kyle Horimoto 2017/05/04 03:52:51 Please store a boolean (maybe call it has_fetched_
Tim Song 2017/05/06 22:53:16 I think this is problematic because this struct is
Ryan Hansberry 2017/05/09 02:32:19 Re: "Anyone can change the beacon_seeds but forget
Tim Song 2017/05/10 21:58:08 The biggest problem still is that it's not really
Ryan Hansberry 2017/05/15 15:43:34 I'm inclined to agree that operator== isn't really
14 public: 16 public:
15 std::string user_id; 17 std::string user_id;
16 std::string name; 18 std::string name;
17 std::string public_key; 19 std::string public_key;
18 std::string bluetooth_address; 20 std::string bluetooth_address;
19 std::string persistent_symmetric_key; 21 std::string persistent_symmetric_key;
20 std::string sign_in_challenge; 22 std::string sign_in_challenge;
21 23
24 // Note: To save space, the BeaconSeeds may not necessarily be included in
25 // this object.
26 std::vector<BeaconSeed> beacon_seeds;
27
22 RemoteDevice(); 28 RemoteDevice();
23 RemoteDevice(const std::string& user_id, 29 RemoteDevice(const std::string& user_id,
24 const std::string& name, 30 const std::string& name,
25 const std::string& public_key, 31 const std::string& public_key,
26 const std::string& bluetooth_address, 32 const std::string& bluetooth_address,
27 const std::string& persistent_symmetric_key, 33 const std::string& persistent_symmetric_key,
28 std::string sign_in_challenge); 34 std::string sign_in_challenge);
29 RemoteDevice(const RemoteDevice& other); 35 RemoteDevice(const RemoteDevice& other);
30 ~RemoteDevice(); 36 ~RemoteDevice();
31 37
(...skipping 13 matching lines...) Expand all
45 51
46 // Static method for truncated device ID for logs. 52 // Static method for truncated device ID for logs.
47 static std::string TruncateDeviceIdForLogs(const std::string& full_id); 53 static std::string TruncateDeviceIdForLogs(const std::string& full_id);
48 }; 54 };
49 55
50 typedef std::vector<RemoteDevice> RemoteDeviceList; 56 typedef std::vector<RemoteDevice> RemoteDeviceList;
51 57
52 } // namespace cryptauth 58 } // namespace cryptauth
53 59
54 #endif // COMPONENTS_CRYPTAUTH_REMOTE_DEVICE_H_ 60 #endif // COMPONENTS_CRYPTAUTH_REMOTE_DEVICE_H_
OLDNEW
« no previous file with comments | « no previous file | components/cryptauth/remote_device.cc » ('j') | components/cryptauth/remote_device.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698