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

Side by Side Diff: chrome/browser/chromeos/login/parallel_authenticator.h

Issue 10832035: Switch from SignedSettings to DeviceSettingsService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PARALLEL_AUTHENTICATOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_PARALLEL_AUTHENTICATOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_PARALLEL_AUTHENTICATOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_PARALLEL_AUTHENTICATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
15 #include "chrome/browser/chromeos/login/authenticator.h"
16 #include "chrome/browser/chromeos/login/auth_attempt_state.h" 15 #include "chrome/browser/chromeos/login/auth_attempt_state.h"
17 #include "chrome/browser/chromeos/login/auth_attempt_state_resolver.h" 16 #include "chrome/browser/chromeos/login/auth_attempt_state_resolver.h"
17 #include "chrome/browser/chromeos/login/authenticator.h"
18 #include "chrome/browser/chromeos/login/online_attempt.h" 18 #include "chrome/browser/chromeos/login/online_attempt.h"
19 #include "chrome/browser/chromeos/login/test_attempt_state.h" 19 #include "chrome/browser/chromeos/login/test_attempt_state.h"
20 #include "chrome/browser/chromeos/settings/device_settings_service.h"
20 #include "chrome/common/net/gaia/gaia_auth_consumer.h" 21 #include "chrome/common/net/gaia/gaia_auth_consumer.h"
21 22
22 class LoginFailure; 23 class LoginFailure;
23 class Profile; 24 class Profile;
24 25
25 namespace chromeos { 26 namespace chromeos {
26 27
27 class LoginStatusConsumer; 28 class LoginStatusConsumer;
28 29
29 // Authenticates a Chromium OS user against the Google Accounts ClientLogin API. 30 // Authenticates a Chromium OS user against the Google Accounts ClientLogin API.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 void LoadSystemSalt(); 213 void LoadSystemSalt();
213 // If we don't have supplemental_user_key_ yet, loads it from the NSS DB. 214 // If we don't have supplemental_user_key_ yet, loads it from the NSS DB.
214 // Returns false if the key can not be loaded/created. 215 // Returns false if the key can not be loaded/created.
215 bool LoadSupplementalUserKey(); 216 bool LoadSupplementalUserKey();
216 217
217 // checks if the current mounted home contains the owner case and either 218 // checks if the current mounted home contains the owner case and either
218 // continues or fails the log-in. Used for policy lost mitigation "safe-mode". 219 // continues or fails the log-in. Used for policy lost mitigation "safe-mode".
219 // Returns true if the owner check has been successful or if it is not needed. 220 // Returns true if the owner check has been successful or if it is not needed.
220 bool VerifyOwner(); 221 bool VerifyOwner();
221 222
222 // checks if the current mounted home contains the owner case and either 223 // Handles completion of the ownership check and continues login.
223 // continues or fails the log-in. Used for policy lost mitigation "safe-mode". 224 void OnOwnershipChecked(DeviceSettingsService::OwnershipStatus status,
224 void FinishVerifyOwnerOnFileThread(); 225 bool is_owner);
225 226
226 // Records OAuth1 access token verification failure for |user_account|. 227 // Records OAuth1 access token verification failure for |user_account|.
227 void RecordOAuthCheckFailure(const std::string& user_account); 228 void RecordOAuthCheckFailure(const std::string& user_account);
228 229
229 // Signal login completion status for cases when a new user is added via 230 // Signal login completion status for cases when a new user is added via
230 // an external authentication provider (i.e. GAIA extension). 231 // an external authentication provider (i.e. GAIA extension).
231 void ResolveLoginCompletionStatus(); 232 void ResolveLoginCompletionStatus();
232 233
233 // Used when we need to try online authentication again, after successful 234 // Used when we need to try online authentication again, after successful
234 // mount, but failed online login. 235 // mount, but failed online login.
(...skipping 10 matching lines...) Expand all
245 // be able to mount her cryptohome, but online authentication will fail. 246 // be able to mount her cryptohome, but online authentication will fail.
246 // This allows us to present the same behavior to the caller, regardless 247 // This allows us to present the same behavior to the caller, regardless
247 // of the order in which we receive these results. 248 // of the order in which we receive these results.
248 bool already_reported_success_; 249 bool already_reported_success_;
249 base::Lock success_lock_; // A lock around |already_reported_success_|. 250 base::Lock success_lock_; // A lock around |already_reported_success_|.
250 251
251 // Flags signaling whether the owner verification has been done and the result 252 // Flags signaling whether the owner verification has been done and the result
252 // of it. 253 // of it.
253 bool owner_is_verified_; 254 bool owner_is_verified_;
254 bool user_can_login_; 255 bool user_can_login_;
255 // A lock for |owner_is_verified_| and |user_can_login_|.
256 base::Lock owner_verified_lock_;
257 256
258 // True if we use OAuth-based authentication flow. 257 // True if we use OAuth-based authentication flow.
259 bool using_oauth_; 258 bool using_oauth_;
260 259
261 DISALLOW_COPY_AND_ASSIGN(ParallelAuthenticator); 260 DISALLOW_COPY_AND_ASSIGN(ParallelAuthenticator);
262 }; 261 };
263 262
264 } // namespace chromeos 263 } // namespace chromeos
265 264
266 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_PARALLEL_AUTHENTICATOR_H_ 265 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_PARALLEL_AUTHENTICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698