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 #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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 const cryptohome::KeyDefinition auth_key(key->GetSecret(), | 167 const cryptohome::KeyDefinition auth_key(key->GetSecret(), |
168 std::string(), | 168 std::string(), |
169 cryptohome::PRIV_DEFAULT); | 169 cryptohome::PRIV_DEFAULT); |
170 cryptohome::MountParameters mount(ephemeral); | 170 cryptohome::MountParameters mount(ephemeral); |
171 if (create_if_nonexistent) { | 171 if (create_if_nonexistent) { |
172 mount.create_keys.push_back(cryptohome::KeyDefinition( | 172 mount.create_keys.push_back(cryptohome::KeyDefinition( |
173 key->GetSecret(), | 173 key->GetSecret(), |
174 kCryptohomeGAIAKeyLabel, | 174 kCryptohomeGAIAKeyLabel, |
175 cryptohome::PRIV_DEFAULT)); | 175 cryptohome::PRIV_DEFAULT)); |
176 } | 176 } |
| 177 mount.force_dircrypto_if_available = |
| 178 attempt->user_context.IsForcingDircrypto(); |
177 | 179 |
178 cryptohome::HomedirMethods::GetInstance()->MountEx( | 180 cryptohome::HomedirMethods::GetInstance()->MountEx( |
179 cryptohome::Identification(attempt->user_context.GetAccountId()), | 181 cryptohome::Identification(attempt->user_context.GetAccountId()), |
180 cryptohome::Authorization(auth_key), mount, | 182 cryptohome::Authorization(auth_key), mount, |
181 base::Bind(&OnMount, attempt, resolver)); | 183 base::Bind(&OnMount, attempt, resolver)); |
182 } | 184 } |
183 | 185 |
184 // Handle cryptohome migration status. | 186 // Handle cryptohome migration status. |
185 void OnCryptohomeRenamed(const base::WeakPtr<AuthAttemptState>& attempt, | 187 void OnCryptohomeRenamed(const base::WeakPtr<AuthAttemptState>& attempt, |
186 scoped_refptr<CryptohomeAuthenticator> resolver, | 188 scoped_refptr<CryptohomeAuthenticator> resolver, |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 Resolve(); | 1025 Resolve(); |
1024 } | 1026 } |
1025 | 1027 |
1026 void CryptohomeAuthenticator::SetOwnerState(bool owner_check_finished, | 1028 void CryptohomeAuthenticator::SetOwnerState(bool owner_check_finished, |
1027 bool check_result) { | 1029 bool check_result) { |
1028 owner_is_verified_ = owner_check_finished; | 1030 owner_is_verified_ = owner_check_finished; |
1029 user_can_login_ = check_result; | 1031 user_can_login_ = check_result; |
1030 } | 1032 } |
1031 | 1033 |
1032 } // namespace chromeos | 1034 } // namespace chromeos |
OLD | NEW |