Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: chrome/browser/chromeos/login/managed/managed_user_creation_controller_new.h

Issue 296773002: Add a Key class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_N EW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLER_N EW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLER_N EW_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLER_N EW_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/auth/extended_authenticator.h" 16 #include "chrome/browser/chromeos/login/auth/extended_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/managed_mode/managed_user_registration_utility.h"
19 19
20 class Profile; 20 class Profile;
21 21
22 namespace chromeos { 22 namespace chromeos {
23 23
24 class UserContext;
25
24 // LMU Creation process: 26 // LMU Creation process:
25 // 0. Manager is logged in 27 // 0. Manager is logged in
26 // 1. Generate ID for new LMU 28 // 1. Generate ID for new LMU
27 // 2. Start "transaction" in Local State. 29 // 2. Start "transaction" in Local State.
28 // 3, Generate keys for user : master key, salt, encryption and signature keys. 30 // 3, Generate keys for user : master key, salt, encryption and signature keys.
29 // 4. Create local cryptohome (errors could arise) 31 // 4. Create local cryptohome (errors could arise)
30 // 5. Create user in cloud (errors could arise) 32 // 5. Create user in cloud (errors could arise)
31 // 6. Store cloud token in cryptohome (actually, error could arise). 33 // 6. Store cloud token in cryptohome (actually, error could arise).
32 // 7. Mark "transaction" as completed. 34 // 7. Mark "transaction" as completed.
33 // 8. End manager session. 35 // 8. End manager session.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 scoped_ptr<ManagedUserRegistrationUtility> registration_utility; 145 scoped_ptr<ManagedUserRegistrationUtility> registration_utility;
144 }; 146 };
145 147
146 // ManagedUserAuthenticator::StatusConsumer overrides. 148 // ManagedUserAuthenticator::StatusConsumer overrides.
147 virtual void OnAuthenticationFailure(ExtendedAuthenticator::AuthState error) 149 virtual void OnAuthenticationFailure(ExtendedAuthenticator::AuthState error)
148 OVERRIDE; 150 OVERRIDE;
149 151
150 // Authenticator success callbacks. 152 // Authenticator success callbacks.
151 void OnMountSuccess(const std::string& mount_hash); 153 void OnMountSuccess(const std::string& mount_hash);
152 void OnAddKeySuccess(); 154 void OnAddKeySuccess();
153 void OnPasswordHashingSuccess(const std::string& password_hash); 155 void OnKeyTransformedIfNeeded(const UserContext& user_context);
154 156
155 void StartCreationImpl(); 157 void StartCreationImpl();
156 158
157 // Guard timer callback. 159 // Guard timer callback.
158 void CreationTimedOut(); 160 void CreationTimedOut();
159 // ManagedUserRegistrationUtility callback. 161 // ManagedUserRegistrationUtility callback.
160 void RegistrationCallback(const GoogleServiceAuthError& error, 162 void RegistrationCallback(const GoogleServiceAuthError& error,
161 const std::string& token); 163 const std::string& token);
162 164
163 // Completion callback for StoreManagedUserFiles method. 165 // Completion callback for StoreManagedUserFiles method.
(...skipping 18 matching lines...) Expand all
182 184
183 // Factory of callbacks. 185 // Factory of callbacks.
184 base::WeakPtrFactory<ManagedUserCreationControllerNew> weak_factory_; 186 base::WeakPtrFactory<ManagedUserCreationControllerNew> weak_factory_;
185 187
186 DISALLOW_COPY_AND_ASSIGN(ManagedUserCreationControllerNew); 188 DISALLOW_COPY_AND_ASSIGN(ManagedUserCreationControllerNew);
187 }; 189 };
188 190
189 } // namespace chromeos 191 } // namespace chromeos
190 192
191 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLE R_NEW_H_ 193 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLE R_NEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698