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

Unified Diff: chrome/browser/extensions/api/music_manager_private/device_id.h

Issue 15738013: Initial implementation of music manager private API. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Code review feedback. Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/music_manager_private/device_id.h
diff --git a/chrome/browser/extensions/api/music_manager_private/device_id.h b/chrome/browser/extensions/api/music_manager_private/device_id.h
new file mode 100644
index 0000000000000000000000000000000000000000..699772aa52c894693b594b26cd80df616166dbde
--- /dev/null
+++ b/chrome/browser/extensions/api/music_manager_private/device_id.h
@@ -0,0 +1,25 @@
+// Copyright 2013 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_EXTENSIONS_API_MUSIC_MANAGER_PRIVATE_DEVICE_ID_H_
+#define CHROME_BROWSER_EXTENSIONS_API_MUSIC_MANAGER_PRIVATE_DEVICE_ID_H_
+
+#include <string>
+
+namespace device_id {
+
+// Return a "device" identifier with the following characteristics:
+// 1. The id is shared across users of a device.
+// 2. The id is resilient to device reboots.
+// 3. There is *some* way for the identifier to be reset (e.g. it can *not* be
+// the MAC address of the device's network card).
+// The implementation varies across platforms. The function should be invoked
+// on the IO thread.
+// The returned value is HMAC_SHA256(device_id, |salt|), so that the actual
+// device identifier value is not exposed directly to the caller.
+std::string GetDeviceID(const std::string& salt);
+
+} // namespace device_id
+
+#endif // CHROME_BROWSER_EXTENSIONS_API_MUSIC_MANAGER_PRIVATE_DEVICE_ID_H_

Powered by Google App Engine
This is Rietveld 408576698