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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 PASSWORD_STATE_UNKNOWN, HAS_PASSWORD_FIELD); | 287 PASSWORD_STATE_UNKNOWN, HAS_PASSWORD_FIELD); |
288 switch (state) { | 288 switch (state) { |
289 ENUM_CASE(sync_pb::TabNavigation, PASSWORD_STATE_UNKNOWN); | 289 ENUM_CASE(sync_pb::TabNavigation, PASSWORD_STATE_UNKNOWN); |
290 ENUM_CASE(sync_pb::TabNavigation, NO_PASSWORD_FIELD); | 290 ENUM_CASE(sync_pb::TabNavigation, NO_PASSWORD_FIELD); |
291 ENUM_CASE(sync_pb::TabNavigation, HAS_PASSWORD_FIELD); | 291 ENUM_CASE(sync_pb::TabNavigation, HAS_PASSWORD_FIELD); |
292 } | 292 } |
293 NOTREACHED(); | 293 NOTREACHED(); |
294 return ""; | 294 return ""; |
295 } | 295 } |
296 | 296 |
297 const char* ProtoEnumToString(sync_pb::Translation::Interaction interaction) { | 297 const char* ProtoEnumToString( |
298 ASSERT_ENUM_BOUNDS(sync_pb::Translation, Interaction, UNKNOWN, | 298 sync_pb::UserEventSpecifics::Translation::Interaction interaction) { |
299 AUTO_TRANSLATION_BY_LINK); | 299 ASSERT_ENUM_BOUNDS(sync_pb::UserEventSpecifics::Translation, Interaction, |
| 300 UNKNOWN, AUTO_TRANSLATION_BY_LINK); |
300 switch (interaction) { | 301 switch (interaction) { |
301 ENUM_CASE(sync_pb::Translation, UNKNOWN); | 302 ENUM_CASE(sync_pb::UserEventSpecifics::Translation, UNKNOWN); |
302 ENUM_CASE(sync_pb::Translation, ACCEPT); | 303 ENUM_CASE(sync_pb::UserEventSpecifics::Translation, ACCEPT); |
303 ENUM_CASE(sync_pb::Translation, DECLINE); | 304 ENUM_CASE(sync_pb::UserEventSpecifics::Translation, DECLINE); |
304 ENUM_CASE(sync_pb::Translation, IGNORED); | 305 ENUM_CASE(sync_pb::UserEventSpecifics::Translation, IGNORED); |
305 ENUM_CASE(sync_pb::Translation, DISMISSED); | 306 ENUM_CASE(sync_pb::UserEventSpecifics::Translation, DISMISSED); |
306 ENUM_CASE(sync_pb::Translation, MANUAL); | 307 ENUM_CASE(sync_pb::UserEventSpecifics::Translation, MANUAL); |
307 ENUM_CASE(sync_pb::Translation, TRANSLATION_REVERTED); | 308 ENUM_CASE(sync_pb::UserEventSpecifics::Translation, TRANSLATION_REVERTED); |
308 ENUM_CASE(sync_pb::Translation, AUTO_TRANSLATION_BY_PREF); | 309 ENUM_CASE(sync_pb::UserEventSpecifics::Translation, |
309 ENUM_CASE(sync_pb::Translation, AUTO_TRANSLATION_BY_LINK); | 310 AUTO_TRANSLATION_BY_PREF); |
| 311 ENUM_CASE(sync_pb::UserEventSpecifics::Translation, |
| 312 AUTO_TRANSLATION_BY_LINK); |
310 } | 313 } |
311 NOTREACHED(); | 314 NOTREACHED(); |
312 return ""; | 315 return ""; |
313 } | 316 } |
314 | 317 |
315 const char* ProtoEnumToString( | 318 const char* ProtoEnumToString( |
316 sync_pb::WalletMaskedCreditCard::WalletCardClass wallet_card_class) { | 319 sync_pb::WalletMaskedCreditCard::WalletCardClass wallet_card_class) { |
317 ASSERT_ENUM_BOUNDS(sync_pb::WalletMaskedCreditCard, WalletCardClass, | 320 ASSERT_ENUM_BOUNDS(sync_pb::WalletMaskedCreditCard, WalletCardClass, |
318 UNKNOWN_CARD_CLASS, PREPAID); | 321 UNKNOWN_CARD_CLASS, PREPAID); |
319 switch (wallet_card_class) { | 322 switch (wallet_card_class) { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 ENUM_CASE(sync_pb::WifiCredentialSpecifics, SECURITY_CLASS_PSK); | 384 ENUM_CASE(sync_pb::WifiCredentialSpecifics, SECURITY_CLASS_PSK); |
382 } | 385 } |
383 NOTREACHED(); | 386 NOTREACHED(); |
384 return ""; | 387 return ""; |
385 } | 388 } |
386 | 389 |
387 #undef ASSERT_ENUM_BOUNDS | 390 #undef ASSERT_ENUM_BOUNDS |
388 #undef ENUM_CASE | 391 #undef ENUM_CASE |
389 | 392 |
390 } // namespace syncer | 393 } // namespace syncer |
OLD | NEW |