| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MANAGED_MANAGED_USER_CREATION_CONTROLLER_O
LD_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLER_O
LD_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLER_O
LD_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLER_O
LD_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "base/timer/timer.h" | 14 #include "base/timer/timer.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "chrome/browser/chromeos/login/managed/managed_user_authenticator.h" | 16 #include "chrome/browser/chromeos/login/managed/managed_user_authenticator.h" |
| 17 #include "chrome/browser/chromeos/login/managed/managed_user_creation_controller
.h" | 17 #include "chrome/browser/chromeos/login/managed/managed_user_creation_controller
.h" |
| 18 #include "chrome/browser/managed_mode/managed_user_registration_utility.h" | 18 #include "chrome/browser/supervised_user/supervised_user_registration_utility.h" |
| 19 | 19 |
| 20 class Profile; | 20 class Profile; |
| 21 | 21 |
| 22 namespace chromeos { | 22 namespace chromeos { |
| 23 | 23 |
| 24 // LMU Creation process: | 24 // LMU Creation process: |
| 25 // 0. Manager is logged in | 25 // 0. Manager is logged in |
| 26 // 1. Generate ID for new LMU | 26 // 1. Generate ID for new LMU |
| 27 // 2. Start "transaction" in Local State. | 27 // 2. Start "transaction" in Local State. |
| 28 // 3. Create local cryptohome (errors could arise) | 28 // 3. Create local cryptohome (errors could arise) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 std::string sync_user_id; // Used to identify user in manager's sync data. | 90 std::string sync_user_id; // Used to identify user in manager's sync data. |
| 91 std::string password; | 91 std::string password; |
| 92 std::string mount_hash; | 92 std::string mount_hash; |
| 93 std::string master_key; | 93 std::string master_key; |
| 94 bool token_acquired; | 94 bool token_acquired; |
| 95 std::string token; | 95 std::string token; |
| 96 bool token_succesfully_written; | 96 bool token_succesfully_written; |
| 97 CreationType creation_type; | 97 CreationType creation_type; |
| 98 base::DictionaryValue password_data; | 98 base::DictionaryValue password_data; |
| 99 Profile* manager_profile; | 99 Profile* manager_profile; |
| 100 scoped_ptr<ManagedUserRegistrationUtility> registration_utility; | 100 scoped_ptr<SupervisedUserRegistrationUtility> registration_utility; |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 void StartCreation(); | 103 void StartCreation(); |
| 104 | 104 |
| 105 // ManagedUserAuthenticator::StatusConsumer overrides. | 105 // ManagedUserAuthenticator::StatusConsumer overrides. |
| 106 virtual void OnAuthenticationFailure( | 106 virtual void OnAuthenticationFailure( |
| 107 ManagedUserAuthenticator::AuthState error) OVERRIDE; | 107 ManagedUserAuthenticator::AuthState error) OVERRIDE; |
| 108 virtual void OnMountSuccess(const std::string& mount_hash) OVERRIDE; | 108 virtual void OnMountSuccess(const std::string& mount_hash) OVERRIDE; |
| 109 virtual void OnAddKeySuccess() OVERRIDE; | 109 virtual void OnAddKeySuccess() OVERRIDE; |
| 110 | 110 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 128 | 128 |
| 129 // Factory of callbacks. | 129 // Factory of callbacks. |
| 130 base::WeakPtrFactory<ManagedUserCreationControllerOld> weak_factory_; | 130 base::WeakPtrFactory<ManagedUserCreationControllerOld> weak_factory_; |
| 131 | 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(ManagedUserCreationControllerOld); | 132 DISALLOW_COPY_AND_ASSIGN(ManagedUserCreationControllerOld); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 } // namespace chromeos | 135 } // namespace chromeos |
| 136 | 136 |
| 137 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLE
R_OLD_H_ | 137 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLE
R_OLD_H_ |
| OLD | NEW |