| 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_SUPERVISED_SUPERVISED_USER_CREATION_CONTRO
LLER_NEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_CONTRO
LLER_NEW_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_CONTRO
LLER_NEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_CONTRO
LLER_NEW_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_cont
roller.h" | 17 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_cont
roller.h" |
| 18 #include "chrome/browser/supervised_user/legacy/supervised_user_registration_uti
lity.h" | 18 #include "chrome/browser/supervised_user/legacy/supervised_user_registration_uti
lity.h" |
| 19 #include "chromeos/login/auth/extended_authenticator.h" | 19 #include "chromeos/login/auth/extended_authenticator.h" |
| 20 #include "components/signin/core/account_id/account_id.h" | 20 #include "components/signin/core/account_id/account_id.h" |
| 21 | 21 |
| 22 class Profile; | 22 class Profile; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 std::string salted_master_key; // Hash(system salt + master key) | 137 std::string salted_master_key; // Hash(system salt + master key) |
| 138 std::string mount_hash; | 138 std::string mount_hash; |
| 139 | 139 |
| 140 std::string token; | 140 std::string token; |
| 141 | 141 |
| 142 CreationType creation_type; | 142 CreationType creation_type; |
| 143 | 143 |
| 144 base::DictionaryValue password_data; | 144 base::DictionaryValue password_data; |
| 145 | 145 |
| 146 Profile* manager_profile; | 146 Profile* manager_profile; |
| 147 scoped_ptr<SupervisedUserRegistrationUtility> registration_utility; | 147 std::unique_ptr<SupervisedUserRegistrationUtility> registration_utility; |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 // SupervisedUserAuthenticator::StatusConsumer overrides. | 150 // SupervisedUserAuthenticator::StatusConsumer overrides. |
| 151 void OnAuthenticationFailure(ExtendedAuthenticator::AuthState error) override; | 151 void OnAuthenticationFailure(ExtendedAuthenticator::AuthState error) override; |
| 152 | 152 |
| 153 // Authenticator success callbacks. | 153 // Authenticator success callbacks. |
| 154 void OnMountSuccess(const std::string& mount_hash); | 154 void OnMountSuccess(const std::string& mount_hash); |
| 155 void OnAddKeySuccess(); | 155 void OnAddKeySuccess(); |
| 156 void OnKeyTransformedIfNeeded(const UserContext& user_context); | 156 void OnKeyTransformedIfNeeded(const UserContext& user_context); |
| 157 | 157 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 171 // automation tests. | 171 // automation tests. |
| 172 static SupervisedUserCreationControllerNew* current_controller_; | 172 static SupervisedUserCreationControllerNew* current_controller_; |
| 173 | 173 |
| 174 // Current stage of user creation. | 174 // Current stage of user creation. |
| 175 Stage stage_; | 175 Stage stage_; |
| 176 | 176 |
| 177 // Authenticator used for user creation. | 177 // Authenticator used for user creation. |
| 178 scoped_refptr<ExtendedAuthenticator> authenticator_; | 178 scoped_refptr<ExtendedAuthenticator> authenticator_; |
| 179 | 179 |
| 180 // Creation context. Not null while creating new LMU. | 180 // Creation context. Not null while creating new LMU. |
| 181 scoped_ptr<UserCreationContext> creation_context_; | 181 std::unique_ptr<UserCreationContext> creation_context_; |
| 182 | 182 |
| 183 // Timer for showing warning if creation process takes too long. | 183 // Timer for showing warning if creation process takes too long. |
| 184 base::OneShotTimer timeout_timer_; | 184 base::OneShotTimer timeout_timer_; |
| 185 | 185 |
| 186 // Factory of callbacks. | 186 // Factory of callbacks. |
| 187 base::WeakPtrFactory<SupervisedUserCreationControllerNew> weak_factory_; | 187 base::WeakPtrFactory<SupervisedUserCreationControllerNew> weak_factory_; |
| 188 | 188 |
| 189 DISALLOW_COPY_AND_ASSIGN(SupervisedUserCreationControllerNew); | 189 DISALLOW_COPY_AND_ASSIGN(SupervisedUserCreationControllerNew); |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 } // namespace chromeos | 192 } // namespace chromeos |
| 193 | 193 |
| 194 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_CON
TROLLER_NEW_H_ | 194 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_CON
TROLLER_NEW_H_ |
| OLD | NEW |