| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_LOGIN_SUPERVISED_USER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_USER_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_USER_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_USER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 | 12 |
| 13 class PrefRegistrySimple; | 13 class PrefRegistrySimple; |
| 14 | 14 |
| 15 namespace chromeos { | 15 namespace chromeos { |
| 16 | 16 |
| 17 class User; | 17 class User; |
| 18 class SupervisedUserAuthentication; |
| 19 |
| 20 extern const char kSchemaVersion[]; |
| 21 extern const char kPasswordRevision[]; |
| 22 extern const char kSalt[]; |
| 23 extern const char kEncryptedPassword[]; |
| 24 extern const int kMinPasswordRevision; |
| 18 | 25 |
| 19 // Base class for SupervisedUserManagerImpl - provides a mechanism for getting | 26 // Base class for SupervisedUserManagerImpl - provides a mechanism for getting |
| 20 // and setting specific values for supervised users, as well as additional | 27 // and setting specific values for supervised users, as well as additional |
| 21 // lookup methods that make sense only for supervised users. | 28 // lookup methods that make sense only for supervised users. |
| 22 class SupervisedUserManager { | 29 class SupervisedUserManager { |
| 23 public: | 30 public: |
| 24 // Registers user manager preferences. | 31 // Registers user manager preferences. |
| 25 static void RegisterPrefs(PrefRegistrySimple* registry); | 32 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 26 | 33 |
| 27 SupervisedUserManager() {} | 34 SupervisedUserManager() {} |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 81 |
| 75 // Create a record about starting supervised user creation transaction. | 82 // Create a record about starting supervised user creation transaction. |
| 76 virtual void StartCreationTransaction(const base::string16& display_name) = 0; | 83 virtual void StartCreationTransaction(const base::string16& display_name) = 0; |
| 77 | 84 |
| 78 // Add user id to supervised user creation transaction record. | 85 // Add user id to supervised user creation transaction record. |
| 79 virtual void SetCreationTransactionUserId(const std::string& user_id) = 0; | 86 virtual void SetCreationTransactionUserId(const std::string& user_id) = 0; |
| 80 | 87 |
| 81 // Remove locally managed user creation transaction record. | 88 // Remove locally managed user creation transaction record. |
| 82 virtual void CommitCreationTransaction() = 0; | 89 virtual void CommitCreationTransaction() = 0; |
| 83 | 90 |
| 91 // Return object that handles specifics of supervised user authentication. |
| 92 virtual SupervisedUserAuthentication* GetAuthentication() = 0; |
| 93 |
| 94 // Fill |result| with public password-specific data for |user_id| from Local |
| 95 // State. |
| 96 virtual void GetPasswordInformation(const std::string& user_id, |
| 97 base::DictionaryValue* result) = 0; |
| 98 |
| 99 // Stores public password-specific data from |password_info| for |user_id| in |
| 100 // Local State. |
| 101 virtual void SetPasswordInformation( |
| 102 const std::string& user_id, |
| 103 const base::DictionaryValue* password_info) = 0; |
| 104 |
| 84 private: | 105 private: |
| 85 DISALLOW_COPY_AND_ASSIGN(SupervisedUserManager); | 106 DISALLOW_COPY_AND_ASSIGN(SupervisedUserManager); |
| 86 }; | 107 }; |
| 87 | 108 |
| 88 } // namespace chromeos | 109 } // namespace chromeos |
| 89 | 110 |
| 90 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_USER_MANAGER_H_ | 111 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_USER_MANAGER_H_ |
| OLD | NEW |