| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // * The |account_id| is chosen by the entity that defines the device-local | 36 // * The |account_id| is chosen by the entity that defines the device-local |
| 37 // account. The only constraints are that the |account_id| be unique and, | 37 // account. The only constraints are that the |account_id| be unique and, |
| 38 // for legacy reasons, it contain an @ symbol. | 38 // for legacy reasons, it contain an @ symbol. |
| 39 // * The |user_id| is a synthesized identifier that is guaranteed to be | 39 // * The |user_id| is a synthesized identifier that is guaranteed to be |
| 40 // unique, contain an @ symbol, not collide with the |user_id| of any other | 40 // unique, contain an @ symbol, not collide with the |user_id| of any other |
| 41 // user on the device (such as regular users or supervised users) and be | 41 // user on the device (such as regular users or supervised users) and be |
| 42 // identifiable as belonging to a device-local account by. | 42 // identifiable as belonging to a device-local account by. |
| 43 // The |account_id| is primarily used by policy code: If device policy defines | 43 // The |account_id| is primarily used by policy code: If device policy defines |
| 44 // a device-local account with a certain |account_id|, the user policy for | 44 // a device-local account with a certain |account_id|, the user policy for |
| 45 // that account has to be fetched by referencing the same |account_id|. | 45 // that account has to be fetched by referencing the same |account_id|. |
| 46 // The |user_id| is passed to the chromeos::UserManager where it becomes part | 46 // The |user_id| is passed to the user_manager::UserManager where it becomes |
| 47 // part |
| 47 // of the global user list on the device. The |account_id| would not be safe | 48 // of the global user list on the device. The |account_id| would not be safe |
| 48 // to use here as it is a free-form identifier that could conflict with | 49 // to use here as it is a free-form identifier that could conflict with |
| 49 // another |user_id| on the device and cannot be easily identified as | 50 // another |user_id| on the device and cannot be easily identified as |
| 50 // belonging to a device-local account. | 51 // belonging to a device-local account. |
| 51 std::string account_id; | 52 std::string account_id; |
| 52 std::string user_id; | 53 std::string user_id; |
| 53 std::string kiosk_app_id; | 54 std::string kiosk_app_id; |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 std::string GenerateDeviceLocalAccountUserId(const std::string& account_id, | 57 std::string GenerateDeviceLocalAccountUserId(const std::string& account_id, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 68 chromeos::CrosSettings* cros_settings, | 69 chromeos::CrosSettings* cros_settings, |
| 69 const std::vector<DeviceLocalAccount>& accounts); | 70 const std::vector<DeviceLocalAccount>& accounts); |
| 70 | 71 |
| 71 // Retrieves a list of device-local accounts from |cros_settings|. | 72 // Retrieves a list of device-local accounts from |cros_settings|. |
| 72 std::vector<DeviceLocalAccount> GetDeviceLocalAccounts( | 73 std::vector<DeviceLocalAccount> GetDeviceLocalAccounts( |
| 73 chromeos::CrosSettings* cros_settings); | 74 chromeos::CrosSettings* cros_settings); |
| 74 | 75 |
| 75 } // namespace policy | 76 } // namespace policy |
| 76 | 77 |
| 77 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_ | 78 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_ |
| OLD | NEW |