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 |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 // Returns a unique ID for the device. | 36 // Returns a unique ID for the device. |
37 std::string GetDeviceId() const; | 37 std::string GetDeviceId() const; |
38 | 38 |
39 // Returns a shortened device ID for the purpose of concise logging (device | 39 // Returns a shortened device ID for the purpose of concise logging (device |
40 // IDs are often so long that logs are difficult to read). Note that this | 40 // IDs are often so long that logs are difficult to read). Note that this |
41 // ID is not guaranteed to be unique, so it should only be used for log. | 41 // ID is not guaranteed to be unique, so it should only be used for log. |
42 std::string GetTruncatedDeviceIdForLogs() const; | 42 std::string GetTruncatedDeviceIdForLogs() const; |
43 | 43 |
44 bool operator==(const RemoteDevice& other) const; | 44 bool operator==(const RemoteDevice& other) const; |
| 45 |
| 46 // Static method for truncated device ID for logs. |
| 47 static std::string TruncateDeviceIdForLogs(const std::string& full_id); |
45 }; | 48 }; |
46 | 49 |
47 typedef std::vector<RemoteDevice> RemoteDeviceList; | 50 typedef std::vector<RemoteDevice> RemoteDeviceList; |
48 | 51 |
49 } // namespace cryptauth | 52 } // namespace cryptauth |
50 | 53 |
51 #endif // COMPONENTS_CRYPTAUTH_REMOTE_DEVICE_H | 54 #endif // COMPONENTS_CRYPTAUTH_REMOTE_DEVICE_H |
OLD | NEW |