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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 bool operator==(const MountParameters& other) const; | 159 bool operator==(const MountParameters& other) const; |
160 | 160 |
161 // If |true|, the mounted home dir will be backed by tmpfs. If |false|, the | 161 // If |true|, the mounted home dir will be backed by tmpfs. If |false|, the |
162 // ephemeral users policy decides whether tmpfs or an encrypted directory is | 162 // ephemeral users policy decides whether tmpfs or an encrypted directory is |
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 |
| 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 |
| 171 // an existing home directory encrypted in the old way (ecryptfs). |
| 172 bool force_dircrypto_if_available; |
168 }; | 173 }; |
169 | 174 |
170 // This function returns true if cryptohome of |account_id| is migrated to | 175 // This function returns true if cryptohome of |account_id| is migrated to |
171 // accountId-based identifier (AccountId::GetAccountIdKey()). | 176 // accountId-based identifier (AccountId::GetAccountIdKey()). |
172 bool GetGaiaIdMigrationStatus(const AccountId& account_id); | 177 bool GetGaiaIdMigrationStatus(const AccountId& account_id); |
173 | 178 |
174 // This function marks |account_id| cryptohome migrated to accountId-based | 179 // This function marks |account_id| cryptohome migrated to accountId-based |
175 // identifier (AccountId::GetAccountIdKey()). | 180 // identifier (AccountId::GetAccountIdKey()). |
176 void SetGaiaIdMigrationStatusDone(const AccountId& account_id); | 181 void SetGaiaIdMigrationStatusDone(const AccountId& account_id); |
177 | 182 |
178 } // namespace cryptohome | 183 } // namespace cryptohome |
179 | 184 |
180 namespace BASE_HASH_NAMESPACE { | 185 namespace BASE_HASH_NAMESPACE { |
181 | 186 |
182 // Implement hashing of cryptohome::Identification, so it can be used as a key | 187 // Implement hashing of cryptohome::Identification, so it can be used as a key |
183 // in STL containers. | 188 // in STL containers. |
184 template <> | 189 template <> |
185 struct hash<cryptohome::Identification> { | 190 struct hash<cryptohome::Identification> { |
186 std::size_t operator()(const cryptohome::Identification& cryptohome_id) const; | 191 std::size_t operator()(const cryptohome::Identification& cryptohome_id) const; |
187 }; | 192 }; |
188 | 193 |
189 } // namespace BASE_HASH_NAMESPACE | 194 } // namespace BASE_HASH_NAMESPACE |
190 | 195 |
191 #endif // CHROMEOS_CRYPTOHOME_CRYPTOHOME_PARAMETERS_H_ | 196 #endif // CHROMEOS_CRYPTOHOME_CRYPTOHOME_PARAMETERS_H_ |
OLD | NEW |