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

Side by Side Diff: components/user_prefs/tracked/device_id.h

Issue 2634403002: Use GetDeterministicMachineSpecificId instead of RLZ for device_id (Closed)
Patch Set: Add some saftey checks and a histogram for the device_id generation Created 3 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_USER_PREFS_TRACKED_DEVICE_ID_H_ 5 #ifndef COMPONENTS_USER_PREFS_TRACKED_DEVICE_ID_H_
6 #define COMPONENTS_USER_PREFS_TRACKED_DEVICE_ID_H_ 6 #define COMPONENTS_USER_PREFS_TRACKED_DEVICE_ID_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 enum class MachineIdStatus { 10 // Used for UMA, do not reorder.
11 enum MachineIdStatus {
11 SUCCESS = 0, 12 SUCCESS = 0,
12 FAILURE, // Returned if attempt to obtain a machine-specific ID fails. 13 FAILURE, // Returned if attempt to obtain a machine-specific ID fails.
13 NOT_IMPLEMENTED // Returned if the method for obtaining a machine-specific ID 14 NOT_IMPLEMENTED, // Returned if not implemented for the current platform.
14 // is not implemented for the system. 15
16 // Add new values before this one.
17 NUM_STATUS
15 }; 18 };
16 19
17 // Populates |machine_id| with a deterministic ID for this machine. |machine_id| 20 // Populates |machine_id| with a deterministic ID for this machine. |machine_id|
18 // must not be null. Returns |FAILURE| if a machine ID cannot be obtained or 21 // must not be null. Returns |FAILURE| if a machine ID cannot be obtained or
19 // |NOT_IMPLEMENTED| on systems for which this feature is not supported (in both 22 // |NOT_IMPLEMENTED| on systems for which this feature is not supported (in both
20 // cases |machine_id| is left untouched). 23 // cases |machine_id| is left untouched).
21 MachineIdStatus GetDeterministicMachineSpecificId(std::string* machine_id); 24 MachineIdStatus GetDeterministicMachineSpecificId(std::string* machine_id);
22 25
23 #endif // COMPONENTS_USER_PREFS_TRACKED_DEVICE_ID_H_ 26 #endif // COMPONENTS_USER_PREFS_TRACKED_DEVICE_ID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698