OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 COMPONENTS_SYNC_CORE_SYNC_ENCRYPTION_HANDLER_H_ | 5 #ifndef COMPONENTS_SYNC_CORE_SYNC_ENCRYPTION_HANDLER_H_ |
6 #define COMPONENTS_SYNC_CORE_SYNC_ENCRYPTION_HANDLER_H_ | 6 #define COMPONENTS_SYNC_CORE_SYNC_ENCRYPTION_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // migration or upgrade. | 24 // migration or upgrade. |
25 REASON_DECRYPTION = 2, // The cryptographer requires a | 25 REASON_DECRYPTION = 2, // The cryptographer requires a |
26 // passphrase for its first attempt at | 26 // passphrase for its first attempt at |
27 // decryption. | 27 // decryption. |
28 }; | 28 }; |
29 | 29 |
30 // The different states for the encryption passphrase. These control if and how | 30 // The different states for the encryption passphrase. These control if and how |
31 // the user should be prompted for a decryption passphrase. | 31 // the user should be prompted for a decryption passphrase. |
32 // Do not re-order or delete these entries; they are used in a UMA histogram. | 32 // Do not re-order or delete these entries; they are used in a UMA histogram. |
33 // Please edit SyncPassphraseType in histograms.xml if a value is added. | 33 // Please edit SyncPassphraseType in histograms.xml if a value is added. |
34 enum PassphraseType { | 34 enum class PassphraseType { |
35 IMPLICIT_PASSPHRASE = 0, // GAIA-based passphrase (deprecated). | 35 IMPLICIT_PASSPHRASE = 0, // GAIA-based passphrase (deprecated). |
36 KEYSTORE_PASSPHRASE = 1, // Keystore passphrase. | 36 KEYSTORE_PASSPHRASE = 1, // Keystore passphrase. |
37 FROZEN_IMPLICIT_PASSPHRASE = 2, // Frozen GAIA passphrase. | 37 FROZEN_IMPLICIT_PASSPHRASE = 2, // Frozen GAIA passphrase. |
38 CUSTOM_PASSPHRASE = 3, // User-provided passphrase. | 38 CUSTOM_PASSPHRASE = 3, // User-provided passphrase. |
39 PASSPHRASE_TYPE_SIZE, // The size of this enum; keep last. | 39 PASSPHRASE_TYPE_SIZE, // The size of this enum; keep last. |
40 }; | 40 }; |
41 | 41 |
42 // Enum used to distinguish which bootstrap encryption token is being updated. | 42 // Enum used to distinguish which bootstrap encryption token is being updated. |
43 enum BootstrapTokenType { | 43 enum BootstrapTokenType { |
44 PASSPHRASE_BOOTSTRAP_TOKEN, | 44 PASSPHRASE_BOOTSTRAP_TOKEN, |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 // bag of encryption keys in the nigori node. | 181 // bag of encryption keys in the nigori node. |
182 virtual PassphraseType GetPassphraseType() const = 0; | 182 virtual PassphraseType GetPassphraseType() const = 0; |
183 | 183 |
184 // The set of types that are always encrypted. | 184 // The set of types that are always encrypted. |
185 static ModelTypeSet SensitiveTypes(); | 185 static ModelTypeSet SensitiveTypes(); |
186 }; | 186 }; |
187 | 187 |
188 } // namespace syncer | 188 } // namespace syncer |
189 | 189 |
190 #endif // COMPONENTS_SYNC_CORE_SYNC_ENCRYPTION_HANDLER_H_ | 190 #endif // COMPONENTS_SYNC_CORE_SYNC_ENCRYPTION_HANDLER_H_ |
OLD | NEW |