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

Side by Side Diff: chromeos/login/auth/cryptohome_authenticator.h

Issue 608283003: Remove retail mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_ 5 #ifndef CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_
6 #define CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_ 6 #define CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 CREATE_NEW = 6, // Need to create cryptohome for a new user. 66 CREATE_NEW = 6, // Need to create cryptohome for a new user.
67 RECOVER_MOUNT = 7, // After RecoverEncryptedData, mount cryptohome. 67 RECOVER_MOUNT = 7, // After RecoverEncryptedData, mount cryptohome.
68 POSSIBLE_PW_CHANGE = 8, // Offline login failed, user may have changed pw. 68 POSSIBLE_PW_CHANGE = 8, // Offline login failed, user may have changed pw.
69 NEED_NEW_PW = 9, // Obsolete (ClientLogin): user changed pw, 69 NEED_NEW_PW = 9, // Obsolete (ClientLogin): user changed pw,
70 // we have the old one. 70 // we have the old one.
71 NEED_OLD_PW = 10, // User changed pw, and we have the new one 71 NEED_OLD_PW = 10, // User changed pw, and we have the new one
72 // (GAIA auth is OK). 72 // (GAIA auth is OK).
73 HAVE_NEW_PW = 11, // Obsolete (ClientLogin): We have verified new pw, 73 HAVE_NEW_PW = 11, // Obsolete (ClientLogin): We have verified new pw,
74 // time to migrate key. 74 // time to migrate key.
75 OFFLINE_LOGIN = 12, // Login succeeded offline. 75 OFFLINE_LOGIN = 12, // Login succeeded offline.
76 DEMO_LOGIN = 13, // Logged in as the demo user. 76 ONLINE_LOGIN = 13, // Offline and online login succeeded.
77 ONLINE_LOGIN = 14, // Offline and online login succeeded. 77 UNLOCK = 14, // Screen unlock succeeded.
78 UNLOCK = 15, // Screen unlock succeeded. 78 ONLINE_FAILED = 15, // Obsolete (ClientLogin): Online login disallowed,
79 ONLINE_FAILED = 16, // Obsolete (ClientLogin): Online login disallowed,
80 // but offline succeeded. 79 // but offline succeeded.
81 GUEST_LOGIN = 17, // Logged in guest mode. 80 GUEST_LOGIN = 16, // Logged in guest mode.
82 PUBLIC_ACCOUNT_LOGIN = 18, // Logged into a public account. 81 PUBLIC_ACCOUNT_LOGIN = 17, // Logged into a public account.
83 SUPERVISED_USER_LOGIN = 19, // Logged in as a supervised user. 82 SUPERVISED_USER_LOGIN = 18, // Logged in as a supervised user.
84 LOGIN_FAILED = 20, // Login denied. 83 LOGIN_FAILED = 19, // Login denied.
85 OWNER_REQUIRED = 21, // Login is restricted to the owner only. 84 OWNER_REQUIRED = 20, // Login is restricted to the owner only.
86 FAILED_USERNAME_HASH = 22, // Failed GetSanitizedUsername request. 85 FAILED_USERNAME_HASH = 21, // Failed GetSanitizedUsername request.
87 KIOSK_ACCOUNT_LOGIN = 23, // Logged into a kiosk account. 86 KIOSK_ACCOUNT_LOGIN = 22, // Logged into a kiosk account.
88 REMOVED_DATA_AFTER_FAILURE = 24, // Successfully removed the user's 87 REMOVED_DATA_AFTER_FAILURE = 23, // Successfully removed the user's
89 // cryptohome after a login failure. 88 // cryptohome after a login failure.
90 }; 89 };
91 90
92 CryptohomeAuthenticator(scoped_refptr<base::TaskRunner> task_runner, 91 CryptohomeAuthenticator(scoped_refptr<base::TaskRunner> task_runner,
93 AuthStatusConsumer* consumer); 92 AuthStatusConsumer* consumer);
94 93
95 // Authenticator overrides. 94 // Authenticator overrides.
96 virtual void CompleteLogin(Profile* profile, 95 virtual void CompleteLogin(Profile* profile,
97 const UserContext& user_context) OVERRIDE; 96 const UserContext& user_context) OVERRIDE;
98 97
(...skipping 12 matching lines...) Expand all
111 // user_context. This will never contact the server even if it's online. 110 // user_context. This will never contact the server even if it's online.
112 // The auth result is sent to AuthStatusConsumer in a same way as 111 // The auth result is sent to AuthStatusConsumer in a same way as
113 // AuthenticateToLogin does. 112 // AuthenticateToLogin does.
114 virtual void AuthenticateToUnlock(const UserContext& user_context) OVERRIDE; 113 virtual void AuthenticateToUnlock(const UserContext& user_context) OVERRIDE;
115 114
116 // Initiates supervised user login. 115 // Initiates supervised user login.
117 // Creates cryptohome if missing or mounts existing one and 116 // Creates cryptohome if missing or mounts existing one and
118 // notifies consumer on the success/failure. 117 // notifies consumer on the success/failure.
119 virtual void LoginAsSupervisedUser(const UserContext& user_context) OVERRIDE; 118 virtual void LoginAsSupervisedUser(const UserContext& user_context) OVERRIDE;
120 119
121 // Initiates retail mode login.
122 // Mounts tmpfs and notifies consumer on the success/failure.
123 virtual void LoginRetailMode() OVERRIDE;
124
125 // Initiates incognito ("browse without signing in") login. 120 // Initiates incognito ("browse without signing in") login.
126 // Mounts tmpfs and notifies consumer on the success/failure. 121 // Mounts tmpfs and notifies consumer on the success/failure.
127 virtual void LoginOffTheRecord() OVERRIDE; 122 virtual void LoginOffTheRecord() OVERRIDE;
128 123
129 // Initiates login into a public session. 124 // Initiates login into a public session.
130 // Mounts an ephemeral cryptohome and notifies consumer on the 125 // Mounts an ephemeral cryptohome and notifies consumer on the
131 // success/failure. 126 // success/failure.
132 virtual void LoginAsPublicSession(const UserContext& user_context) OVERRIDE; 127 virtual void LoginAsPublicSession(const UserContext& user_context) OVERRIDE;
133 128
134 // Initiates login into the kiosk mode account identified by |app_user_id|. 129 // Initiates login into the kiosk mode account identified by |app_user_id|.
135 // Mounts an ephemeral guest cryptohome if |use_guest_mount| is |true|. 130 // Mounts an ephemeral guest cryptohome if |use_guest_mount| is |true|.
136 // Otherwise, mounts a public cryptohome, which will be ephemeral if the 131 // Otherwise, mounts a public cryptohome, which will be ephemeral if the
137 // |DeviceEphemeralUsersEnabled| policy is enabled and non-ephemeral 132 // |DeviceEphemeralUsersEnabled| policy is enabled and non-ephemeral
138 // otherwise. 133 // otherwise.
139 virtual void LoginAsKioskAccount(const std::string& app_user_id, 134 virtual void LoginAsKioskAccount(const std::string& app_user_id,
140 bool use_guest_mount) OVERRIDE; 135 bool use_guest_mount) OVERRIDE;
141 136
142 // These methods must be called on the UI thread, as they make DBus calls 137 // These methods must be called on the UI thread, as they make DBus calls
143 // and also call back to the login UI. 138 // and also call back to the login UI.
144 virtual void OnRetailModeAuthSuccess() OVERRIDE;
145 virtual void OnAuthSuccess() OVERRIDE; 139 virtual void OnAuthSuccess() OVERRIDE;
146 virtual void OnAuthFailure(const AuthFailure& error) OVERRIDE; 140 virtual void OnAuthFailure(const AuthFailure& error) OVERRIDE;
147 virtual void RecoverEncryptedData(const std::string& old_password) OVERRIDE; 141 virtual void RecoverEncryptedData(const std::string& old_password) OVERRIDE;
148 virtual void ResyncEncryptedData() OVERRIDE; 142 virtual void ResyncEncryptedData() OVERRIDE;
149 143
150 // AuthAttemptStateResolver overrides. 144 // AuthAttemptStateResolver overrides.
151 // Attempts to make a decision and call back |consumer_| based on 145 // Attempts to make a decision and call back |consumer_| based on
152 // the state we have gathered at the time of call. If a decision 146 // the state we have gathered at the time of call. If a decision
153 // can't be made, defers until the next time this is called. 147 // can't be made, defers until the next time this is called.
154 // When a decision is made, will call back to |consumer_| on the UI thread. 148 // When a decision is made, will call back to |consumer_| on the UI thread.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // When |remove_user_data_on_failure_| is set, we delay calling 254 // When |remove_user_data_on_failure_| is set, we delay calling
261 // consumer_->OnAuthFailure() until we removed the user cryptohome. 255 // consumer_->OnAuthFailure() until we removed the user cryptohome.
262 const AuthFailure* delayed_login_failure_; 256 const AuthFailure* delayed_login_failure_;
263 257
264 DISALLOW_COPY_AND_ASSIGN(CryptohomeAuthenticator); 258 DISALLOW_COPY_AND_ASSIGN(CryptohomeAuthenticator);
265 }; 259 };
266 260
267 } // namespace chromeos 261 } // namespace chromeos
268 262
269 #endif // CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_ 263 #endif // CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698