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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 Type type; | 34 Type type; |
35 std::string account_id; | 35 std::string account_id; |
36 std::string user_id; | 36 std::string user_id; |
37 std::string kiosk_app_id; | 37 std::string kiosk_app_id; |
38 }; | 38 }; |
39 | 39 |
40 std::string GenerateDeviceLocalAccountUserId(const std::string& account_id, | 40 std::string GenerateDeviceLocalAccountUserId(const std::string& account_id, |
41 DeviceLocalAccount::Type type); | 41 DeviceLocalAccount::Type type); |
42 | 42 |
43 bool IsDeviceLocalAccountUser(const std::string& user_id); | 43 // Determines whether |user_id| belongs to a device-local account and if so, |
44 | 44 // returns the type of device-local account in |type| unless |type| is NULL. |
45 bool IsKioskAppUser(const std::string& user_id); | 45 bool IsDeviceLocalAccountUser(const std::string& user_id, |
| 46 DeviceLocalAccount::Type* type); |
46 | 47 |
47 // Stores a list of device-local accounts in |cros_settings|. The accounts are | 48 // Stores a list of device-local accounts in |cros_settings|. The accounts are |
48 // stored as a list of dictionaries with each dictionary containing the | 49 // stored as a list of dictionaries with each dictionary containing the |
49 // information about one |DeviceLocalAccount|. | 50 // information about one |DeviceLocalAccount|. |
50 void SetDeviceLocalAccounts( | 51 void SetDeviceLocalAccounts( |
51 chromeos::CrosSettings* cros_settings, | 52 chromeos::CrosSettings* cros_settings, |
52 const std::vector<DeviceLocalAccount>& accounts); | 53 const std::vector<DeviceLocalAccount>& accounts); |
53 | 54 |
54 // Retrieves a list of device-local accounts from |cros_settings|. | 55 // Retrieves a list of device-local accounts from |cros_settings|. |
55 std::vector<DeviceLocalAccount> GetDeviceLocalAccounts( | 56 std::vector<DeviceLocalAccount> GetDeviceLocalAccounts( |
56 chromeos::CrosSettings* cros_settings); | 57 chromeos::CrosSettings* cros_settings); |
57 | 58 |
58 } // namespace policy | 59 } // namespace policy |
59 | 60 |
60 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_ | 61 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_ |
OLD | NEW |