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

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

Issue 2590713002: [CrOS Tether] Add a static TruncateDeviceIdForLogs() function. (Closed)
Patch Set: Fix style and variable name. Created 4 years 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
(...skipping 24 matching lines...) Expand all
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
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