OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef RLZ_LIB_MACHINE_ID_H_ | |
6 #define RLZ_LIB_MACHINE_ID_H_ | |
7 | |
8 #include "base/string16.h" | |
9 | |
10 #include <string> | |
11 | |
12 namespace rlz_lib { | |
13 | |
14 // Gets the unique ID for the machine used for RLZ tracking purposes. On | |
15 // Windows, this ID is derived from the Windows machine SID, and is the string | |
16 // representation of a 20 byte hash + 4 bytes volum id + a 1 byte checksum. | |
17 // Included in financial pings with events, unless explicitly forbidden by the | |
18 // calling application. | |
19 bool GetMachineId(std::string* machine_id); | |
20 | |
21 // Retrieves a raw machine identifier string and a machine-specific | |
22 // 4 byte value. GetMachineId() will SHA1 |data|, append |more_data|, compute | |
23 // the Crc8 of that, and return a hex-encoded string of that data. | |
24 bool GetRawMachineId(string16* data, int* more_data); | |
25 | |
26 namespace testing { | |
27 bool GetMachineIdImpl(const string16& sid_string, | |
28 int volume_id, | |
29 std::string* machine_id); | |
30 } // namespace testing | |
31 | |
32 } // namespace rlz_lib | |
33 | |
34 #endif // RLZ_LIB_MACHINE_ID_H_ | |
OLD | NEW |