OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "components/sync/engine/sync_string_conversions.h" | 5 #include "components/sync/engine/sync_string_conversions.h" |
6 | 6 |
7 #define ENUM_CASE(x) \ | 7 #define ENUM_CASE(x) \ |
8 case x: \ | 8 case x: \ |
9 return #x | 9 return #x |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 ENUM_CASE(REASON_ENCRYPTION); | 28 ENUM_CASE(REASON_ENCRYPTION); |
29 ENUM_CASE(REASON_DECRYPTION); | 29 ENUM_CASE(REASON_DECRYPTION); |
30 default: | 30 default: |
31 NOTREACHED(); | 31 NOTREACHED(); |
32 return "INVALID_REASON"; | 32 return "INVALID_REASON"; |
33 } | 33 } |
34 } | 34 } |
35 | 35 |
36 const char* PassphraseTypeToString(PassphraseType type) { | 36 const char* PassphraseTypeToString(PassphraseType type) { |
37 switch (type) { | 37 switch (type) { |
38 ENUM_CASE(IMPLICIT_PASSPHRASE); | 38 ENUM_CASE(PassphraseType::IMPLICIT_PASSPHRASE); |
39 ENUM_CASE(KEYSTORE_PASSPHRASE); | 39 ENUM_CASE(PassphraseType::KEYSTORE_PASSPHRASE); |
40 ENUM_CASE(FROZEN_IMPLICIT_PASSPHRASE); | 40 ENUM_CASE(PassphraseType::FROZEN_IMPLICIT_PASSPHRASE); |
41 ENUM_CASE(CUSTOM_PASSPHRASE); | 41 ENUM_CASE(PassphraseType::CUSTOM_PASSPHRASE); |
42 default: | 42 default: |
43 NOTREACHED(); | 43 NOTREACHED(); |
44 return "INVALID_PASSPHRASE_TYPE"; | 44 return "INVALID_PASSPHRASE_TYPE"; |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 const char* BootstrapTokenTypeToString(BootstrapTokenType type) { | 48 const char* BootstrapTokenTypeToString(BootstrapTokenType type) { |
49 switch (type) { | 49 switch (type) { |
50 ENUM_CASE(PASSPHRASE_BOOTSTRAP_TOKEN); | 50 ENUM_CASE(PASSPHRASE_BOOTSTRAP_TOKEN); |
51 ENUM_CASE(KEYSTORE_BOOTSTRAP_TOKEN); | 51 ENUM_CASE(KEYSTORE_BOOTSTRAP_TOKEN); |
52 default: | 52 default: |
53 NOTREACHED(); | 53 NOTREACHED(); |
54 return "INVALID_BOOTSTRAP_TOKEN_TYPE"; | 54 return "INVALID_BOOTSTRAP_TOKEN_TYPE"; |
55 } | 55 } |
56 } | 56 } |
57 | 57 |
58 } // namespace syncer | 58 } // namespace syncer |
OLD | NEW |