OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MUSIC_MANAGER_PRIVATE_DEVICE_ID_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_MUSIC_MANAGER_PRIVATE_DEVICE_ID_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 namespace device_id { |
| 11 |
| 12 // Return a "device" identifier with the following characteristics: |
| 13 // 1. The id is shared across users of a device. |
| 14 // 2. The id is resilient to device reboots. |
| 15 // 3. There is *some* way for the identifier to be reset (e.g. it can *not* be |
| 16 // the MAC address of the device's network card). |
| 17 // The specific implementation varies across platforms, but is currently |
| 18 // fast enough that it can be run on the UI thread. |
| 19 // The returned value is HMAC_SHA256(device_id, |salt|), so that the actual |
| 20 // device identifier value is not exposed directly to the caller. |
| 21 std::string GetDeviceID(const std::string& salt); |
| 22 |
| 23 } // namespace device_id |
| 24 |
| 25 #endif // CHROME_BROWSER_EXTENSIONS_API_MUSIC_MANAGER_PRIVATE_DEVICE_ID_H_ |
OLD | NEW |