| 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 #ifndef CHROMEOS_CRYPTOHOME_CRYPTOHOME_PARAMETERS_H_ | 5 #ifndef CHROMEOS_CRYPTOHOME_CRYPTOHOME_PARAMETERS_H_ |
| 6 #define CHROMEOS_CRYPTOHOME_CRYPTOHOME_PARAMETERS_H_ | 6 #define CHROMEOS_CRYPTOHOME_CRYPTOHOME_PARAMETERS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 // used as the backend. | 163 // used as the backend. |
| 164 bool ephemeral; | 164 bool ephemeral; |
| 165 | 165 |
| 166 // If not empty, home dir will be created with these keys if it exist. | 166 // If not empty, home dir will be created with these keys if it exist. |
| 167 std::vector<KeyDefinition> create_keys; | 167 std::vector<KeyDefinition> create_keys; |
| 168 | 168 |
| 169 // If |true|, and cryptohomed supports the new "dircrypto" encryption, | 169 // If |true|, and cryptohomed supports the new "dircrypto" encryption, |
| 170 // forces to use the new encryption. That is, makes it an error to mount | 170 // forces to use the new encryption. That is, makes it an error to mount |
| 171 // an existing home directory encrypted in the old way (ecryptfs). | 171 // an existing home directory encrypted in the old way (ecryptfs). |
| 172 bool force_dircrypto_if_available = false; | 172 bool force_dircrypto_if_available = false; |
| 173 |
| 174 // If |true|, mounts the existing ecryptfs vault to a temporary location while |
| 175 // setting up a new dircrypto directory. |
| 176 bool to_migrate_from_ecryptfs = false; |
| 173 }; | 177 }; |
| 174 | 178 |
| 175 // This function returns true if cryptohome of |account_id| is migrated to | 179 // This function returns true if cryptohome of |account_id| is migrated to |
| 176 // accountId-based identifier (AccountId::GetAccountIdKey()). | 180 // accountId-based identifier (AccountId::GetAccountIdKey()). |
| 177 bool GetGaiaIdMigrationStatus(const AccountId& account_id); | 181 bool GetGaiaIdMigrationStatus(const AccountId& account_id); |
| 178 | 182 |
| 179 // This function marks |account_id| cryptohome migrated to accountId-based | 183 // This function marks |account_id| cryptohome migrated to accountId-based |
| 180 // identifier (AccountId::GetAccountIdKey()). | 184 // identifier (AccountId::GetAccountIdKey()). |
| 181 void SetGaiaIdMigrationStatusDone(const AccountId& account_id); | 185 void SetGaiaIdMigrationStatusDone(const AccountId& account_id); |
| 182 | 186 |
| 183 } // namespace cryptohome | 187 } // namespace cryptohome |
| 184 | 188 |
| 185 namespace BASE_HASH_NAMESPACE { | 189 namespace BASE_HASH_NAMESPACE { |
| 186 | 190 |
| 187 // Implement hashing of cryptohome::Identification, so it can be used as a key | 191 // Implement hashing of cryptohome::Identification, so it can be used as a key |
| 188 // in STL containers. | 192 // in STL containers. |
| 189 template <> | 193 template <> |
| 190 struct hash<cryptohome::Identification> { | 194 struct hash<cryptohome::Identification> { |
| 191 std::size_t operator()(const cryptohome::Identification& cryptohome_id) const; | 195 std::size_t operator()(const cryptohome::Identification& cryptohome_id) const; |
| 192 }; | 196 }; |
| 193 | 197 |
| 194 } // namespace BASE_HASH_NAMESPACE | 198 } // namespace BASE_HASH_NAMESPACE |
| 195 | 199 |
| 196 #endif // CHROMEOS_CRYPTOHOME_CRYPTOHOME_PARAMETERS_H_ | 200 #endif // CHROMEOS_CRYPTOHOME_CRYPTOHOME_PARAMETERS_H_ |
| OLD | NEW |