| 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/protocol/proto_enum_conversions.h" | 5 #include "components/sync/protocol/proto_enum_conversions.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace syncer { | 9 namespace syncer { |
| 10 | 10 |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 ENUM_CASE(sync_pb::WalletMaskedCreditCard, MAESTRO); | 243 ENUM_CASE(sync_pb::WalletMaskedCreditCard, MAESTRO); |
| 244 ENUM_CASE(sync_pb::WalletMaskedCreditCard, MASTER_CARD); | 244 ENUM_CASE(sync_pb::WalletMaskedCreditCard, MASTER_CARD); |
| 245 ENUM_CASE(sync_pb::WalletMaskedCreditCard, SOLO); | 245 ENUM_CASE(sync_pb::WalletMaskedCreditCard, SOLO); |
| 246 ENUM_CASE(sync_pb::WalletMaskedCreditCard, SWITCH); | 246 ENUM_CASE(sync_pb::WalletMaskedCreditCard, SWITCH); |
| 247 ENUM_CASE(sync_pb::WalletMaskedCreditCard, VISA); | 247 ENUM_CASE(sync_pb::WalletMaskedCreditCard, VISA); |
| 248 } | 248 } |
| 249 NOTREACHED(); | 249 NOTREACHED(); |
| 250 return ""; | 250 return ""; |
| 251 } | 251 } |
| 252 | 252 |
| 253 const char* ProtoEnumToString( |
| 254 sync_pb::WalletMaskedCreditCard::WalletCardClass wallet_card_class) { |
| 255 switch (wallet_card_class) { |
| 256 ENUM_CASE(sync_pb::WalletMaskedCreditCard, UNKNOWN_CARD_CLASS); |
| 257 ENUM_CASE(sync_pb::WalletMaskedCreditCard, CREDIT); |
| 258 ENUM_CASE(sync_pb::WalletMaskedCreditCard, DEBIT); |
| 259 ENUM_CASE(sync_pb::WalletMaskedCreditCard, PREPAID); |
| 260 } |
| 261 NOTREACHED(); |
| 262 return ""; |
| 263 } |
| 264 |
| 253 const char* ProtoEnumToString(sync_pb::SyncEnums::DeviceType device_type) { | 265 const char* ProtoEnumToString(sync_pb::SyncEnums::DeviceType device_type) { |
| 254 ASSERT_ENUM_BOUNDS(sync_pb::SyncEnums, DeviceType, TYPE_WIN, TYPE_TABLET); | 266 ASSERT_ENUM_BOUNDS(sync_pb::SyncEnums, DeviceType, TYPE_WIN, TYPE_TABLET); |
| 255 switch (device_type) { | 267 switch (device_type) { |
| 256 ENUM_CASE(sync_pb::SyncEnums, TYPE_WIN); | 268 ENUM_CASE(sync_pb::SyncEnums, TYPE_WIN); |
| 257 ENUM_CASE(sync_pb::SyncEnums, TYPE_MAC); | 269 ENUM_CASE(sync_pb::SyncEnums, TYPE_MAC); |
| 258 ENUM_CASE(sync_pb::SyncEnums, TYPE_LINUX); | 270 ENUM_CASE(sync_pb::SyncEnums, TYPE_LINUX); |
| 259 ENUM_CASE(sync_pb::SyncEnums, TYPE_CROS); | 271 ENUM_CASE(sync_pb::SyncEnums, TYPE_CROS); |
| 260 ENUM_CASE(sync_pb::SyncEnums, TYPE_OTHER); | 272 ENUM_CASE(sync_pb::SyncEnums, TYPE_OTHER); |
| 261 ENUM_CASE(sync_pb::SyncEnums, TYPE_PHONE); | 273 ENUM_CASE(sync_pb::SyncEnums, TYPE_PHONE); |
| 262 ENUM_CASE(sync_pb::SyncEnums, TYPE_TABLET); | 274 ENUM_CASE(sync_pb::SyncEnums, TYPE_TABLET); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 ENUM_CASE(sync_pb::ReadingListSpecifics, UNSEEN); | 354 ENUM_CASE(sync_pb::ReadingListSpecifics, UNSEEN); |
| 343 } | 355 } |
| 344 NOTREACHED(); | 356 NOTREACHED(); |
| 345 return ""; | 357 return ""; |
| 346 } | 358 } |
| 347 | 359 |
| 348 #undef ASSERT_ENUM_BOUNDS | 360 #undef ASSERT_ENUM_BOUNDS |
| 349 #undef ENUM_CASE | 361 #undef ENUM_CASE |
| 350 | 362 |
| 351 } // namespace syncer | 363 } // namespace syncer |
| OLD | NEW |