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

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

Issue 2835473002: Chromad: Allow offline login. (Closed)
Patch Set: Add TryAuthenticateUser call Created 3 years, 8 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
« no previous file with comments | « chromeos/login/auth/authpolicy_login_helper.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chromeos/login/auth/cryptohome_authenticator.h" 5 #include "chromeos/login/auth/cryptohome_authenticator.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 already_reported_success_(false), 485 already_reported_success_(false),
486 owner_is_verified_(false), 486 owner_is_verified_(false),
487 user_can_login_(false), 487 user_can_login_(false),
488 remove_user_data_on_failure_(false), 488 remove_user_data_on_failure_(false),
489 delayed_login_failure_(NULL) { 489 delayed_login_failure_(NULL) {
490 } 490 }
491 491
492 void CryptohomeAuthenticator::AuthenticateToLogin( 492 void CryptohomeAuthenticator::AuthenticateToLogin(
493 content::BrowserContext* context, 493 content::BrowserContext* context,
494 const UserContext& user_context) { 494 const UserContext& user_context) {
495 DCHECK_EQ(user_manager::USER_TYPE_REGULAR, user_context.GetUserType()); 495 DCHECK(user_context.GetUserType() == user_manager::USER_TYPE_REGULAR ||
496 user_context.GetUserType() ==
497 user_manager::USER_TYPE_ACTIVE_DIRECTORY);
496 authentication_context_ = context; 498 authentication_context_ = context;
497 current_state_.reset(new AuthAttemptState(user_context, 499 current_state_.reset(new AuthAttemptState(user_context,
498 false, // unlock 500 false, // unlock
499 false, // online_complete 501 false, // online_complete
500 !IsKnownUser(user_context))); 502 !IsKnownUser(user_context)));
501 // Reset the verified flag. 503 // Reset the verified flag.
502 owner_is_verified_ = false; 504 owner_is_verified_ = false;
503 505
504 StartMount(current_state_->AsWeakPtr(), 506 StartMount(current_state_->AsWeakPtr(),
505 scoped_refptr<CryptohomeAuthenticator>(this), 507 scoped_refptr<CryptohomeAuthenticator>(this),
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 Resolve(); 1036 Resolve();
1035 } 1037 }
1036 1038
1037 void CryptohomeAuthenticator::SetOwnerState(bool owner_check_finished, 1039 void CryptohomeAuthenticator::SetOwnerState(bool owner_check_finished,
1038 bool check_result) { 1040 bool check_result) {
1039 owner_is_verified_ = owner_check_finished; 1041 owner_is_verified_ = owner_check_finished;
1040 user_can_login_ = check_result; 1042 user_can_login_ = check_result;
1041 } 1043 }
1042 1044
1043 } // namespace chromeos 1045 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/login/auth/authpolicy_login_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698