OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "rlz/lib/machine_id.h" | 5 #include "rlz/lib/machine_id.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/sha1.h" | 9 #include "base/sha1.h" |
8 #include "rlz/lib/assert.h" | 10 #include "rlz/lib/assert.h" |
9 #include "rlz/lib/crc8.h" | 11 #include "rlz/lib/crc8.h" |
10 #include "rlz/lib/string_utils.h" | 12 #include "rlz/lib/string_utils.h" |
11 | 13 |
12 namespace rlz_lib { | 14 namespace rlz_lib { |
13 | 15 |
14 bool GetMachineId(std::string* machine_id) { | 16 bool GetMachineId(std::string* machine_id) { |
15 if (!machine_id) | 17 if (!machine_id) |
16 return false; | 18 return false; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 kSizeWithoutChecksum, | 77 kSizeWithoutChecksum, |
76 &id_binary[kSizeWithoutChecksum]); | 78 &id_binary[kSizeWithoutChecksum]); |
77 | 79 |
78 return rlz_lib::BytesToString( | 80 return rlz_lib::BytesToString( |
79 id_binary.c_str(), kSizeWithoutChecksum + 1, machine_id); | 81 id_binary.c_str(), kSizeWithoutChecksum + 1, machine_id); |
80 } | 82 } |
81 | 83 |
82 } // namespace testing | 84 } // namespace testing |
83 | 85 |
84 } // namespace rlz_lib | 86 } // namespace rlz_lib |
OLD | NEW |