Index: chrome/browser/prefs/tracked/device_id.h |
diff --git a/chrome/browser/prefs/tracked/device_id.h b/chrome/browser/prefs/tracked/device_id.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..859e877901e0c92e3427ac0434889d8e2a3a248d |
--- /dev/null |
+++ b/chrome/browser/prefs/tracked/device_id.h |
@@ -0,0 +1,29 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_PREFS_TRACKED_DEVICE_ID_H_ |
+#define CHROME_BROWSER_PREFS_TRACKED_DEVICE_ID_H_ |
+ |
+#include <string> |
+ |
+namespace tracked_prefs { |
+ |
+enum MachineIdStatus { |
gab
2015/01/26 19:40:46
Use enum class (avoids polluting the namespace and
alito
2015/01/26 21:01:10
Done.
|
+ SUCCESS = 0, |
+ FAILURE, // Returned if attempt to obtain a machine-specific ID fails. |
+ NOT_IMPLEMENTED // Returned if the method for obtaining a |
+ // machine-specific ID is not implemented for |
+ // the system. |
+}; |
+ |
+// Populates |machine_id| with a deterministic ID for this |
+// machine. |machine_id| must be non-NULL and point to a valid |
+// std::string object. Returns |FAILURE| if a machine ID cannot be |
gab
2015/01/26 19:40:46
Remove "and point to a a valid std::string object"
alito
2015/01/26 21:01:10
Done.
|
+// obtained or |NOT_IMPLEMENTED| on systems for which this feature is |
+// not supported (in both cases |machine_id| is left untouched). |
+MachineIdStatus GetDeterministicMachineSpecificId(std::string* machine_id); |
+ |
+} // namespace tracked_prefs |
+ |
+#endif // CHROME_BROWSER_PREFS_TRACKED_DEVICE_ID_H_ |