| 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 // Keep this file in sync with the .proto files in this directory. | 5 // Keep this file in sync with the .proto files in this directory. |
| 6 | 6 |
| 7 #include "sync/protocol/proto_enum_conversions.h" | 7 #include "sync/protocol/proto_enum_conversions.h" |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 UNKNOWN, POSTAL_ADDRESS); | 207 UNKNOWN, POSTAL_ADDRESS); |
| 208 switch (wallet_info_type) { | 208 switch (wallet_info_type) { |
| 209 ENUM_CASE(sync_pb::AutofillWalletSpecifics, UNKNOWN); | 209 ENUM_CASE(sync_pb::AutofillWalletSpecifics, UNKNOWN); |
| 210 ENUM_CASE(sync_pb::AutofillWalletSpecifics, MASKED_CREDIT_CARD); | 210 ENUM_CASE(sync_pb::AutofillWalletSpecifics, MASKED_CREDIT_CARD); |
| 211 ENUM_CASE(sync_pb::AutofillWalletSpecifics, POSTAL_ADDRESS); | 211 ENUM_CASE(sync_pb::AutofillWalletSpecifics, POSTAL_ADDRESS); |
| 212 } | 212 } |
| 213 NOTREACHED(); | 213 NOTREACHED(); |
| 214 return ""; | 214 return ""; |
| 215 } | 215 } |
| 216 | 216 |
| 217 const char* GetWalletMetadataTypeString( |
| 218 sync_pb::WalletMetadataSpecifics::Type wallet_metadata_type) { |
| 219 ASSERT_ENUM_BOUNDS(sync_pb::WalletMetadataSpecifics, Type, UNKNOWN, ADDRESS); |
| 220 switch (wallet_metadata_type) { |
| 221 ENUM_CASE(sync_pb::WalletMetadataSpecifics, UNKNOWN); |
| 222 ENUM_CASE(sync_pb::WalletMetadataSpecifics, CARD); |
| 223 ENUM_CASE(sync_pb::WalletMetadataSpecifics, ADDRESS); |
| 224 } |
| 225 NOTREACHED(); |
| 226 return ""; |
| 227 } |
| 228 |
| 217 const char* GetWalletCardStatusString( | 229 const char* GetWalletCardStatusString( |
| 218 sync_pb::WalletMaskedCreditCard::WalletCardStatus wallet_card_status) { | 230 sync_pb::WalletMaskedCreditCard::WalletCardStatus wallet_card_status) { |
| 219 switch (wallet_card_status) { | 231 switch (wallet_card_status) { |
| 220 ENUM_CASE(sync_pb::WalletMaskedCreditCard, VALID); | 232 ENUM_CASE(sync_pb::WalletMaskedCreditCard, VALID); |
| 221 ENUM_CASE(sync_pb::WalletMaskedCreditCard, EXPIRED); | 233 ENUM_CASE(sync_pb::WalletMaskedCreditCard, EXPIRED); |
| 222 } | 234 } |
| 223 NOTREACHED(); | 235 NOTREACHED(); |
| 224 return ""; | 236 return ""; |
| 225 } | 237 } |
| 226 | 238 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 ENUM_CASE(sync_pb::TabNavigation, STATE_BLOCKED); | 326 ENUM_CASE(sync_pb::TabNavigation, STATE_BLOCKED); |
| 315 } | 327 } |
| 316 NOTREACHED(); | 328 NOTREACHED(); |
| 317 return ""; | 329 return ""; |
| 318 } | 330 } |
| 319 | 331 |
| 320 #undef ASSERT_ENUM_BOUNDS | 332 #undef ASSERT_ENUM_BOUNDS |
| 321 #undef ENUM_CASE | 333 #undef ENUM_CASE |
| 322 | 334 |
| 323 } // namespace syncer | 335 } // namespace syncer |
| OLD | NEW |