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

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: Rebasing. 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/music_manager_private/device_id.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..adc7eab1337ab6f709c65c380b25bc00f79572ea
--- /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 specific implementation varies across platforms, but is currently
+// fast enough that it can be run on the UI 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_
« no previous file with comments | « no previous file | chrome/browser/extensions/api/music_manager_private/device_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698