Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1143)

Side by Side Diff: components/sync/protocol/proto_enum_conversions.cc

Issue 2911603002: Initial translation event proto. (Closed)
Patch Set: update fields. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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) {
298 ASSERT_ENUM_BOUNDS(sync_pb::Translation, Interaction, UNKNOWN, MANUAL);
299 switch (interaction) {
300 ENUM_CASE(sync_pb::Translation, UNKNOWN);
301 ENUM_CASE(sync_pb::Translation, ACCEPTED);
302 ENUM_CASE(sync_pb::Translation, REJECTED);
303 ENUM_CASE(sync_pb::Translation, IGNORED);
304 ENUM_CASE(sync_pb::Translation, DISMISSED);
305 ENUM_CASE(sync_pb::Translation, MANUAL);
306 }
307 NOTREACHED();
308 return "";
309 }
310
297 const char* ProtoEnumToString( 311 const char* ProtoEnumToString(
298 sync_pb::WalletMaskedCreditCard::WalletCardClass wallet_card_class) { 312 sync_pb::WalletMaskedCreditCard::WalletCardClass wallet_card_class) {
299 switch (wallet_card_class) { 313 switch (wallet_card_class) {
300 ENUM_CASE(sync_pb::WalletMaskedCreditCard, UNKNOWN_CARD_CLASS); 314 ENUM_CASE(sync_pb::WalletMaskedCreditCard, UNKNOWN_CARD_CLASS);
301 ENUM_CASE(sync_pb::WalletMaskedCreditCard, CREDIT); 315 ENUM_CASE(sync_pb::WalletMaskedCreditCard, CREDIT);
302 ENUM_CASE(sync_pb::WalletMaskedCreditCard, DEBIT); 316 ENUM_CASE(sync_pb::WalletMaskedCreditCard, DEBIT);
303 ENUM_CASE(sync_pb::WalletMaskedCreditCard, PREPAID); 317 ENUM_CASE(sync_pb::WalletMaskedCreditCard, PREPAID);
304 } 318 }
305 NOTREACHED(); 319 NOTREACHED();
306 return ""; 320 return "";
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 ENUM_CASE(sync_pb::WifiCredentialSpecifics, SECURITY_CLASS_PSK); 371 ENUM_CASE(sync_pb::WifiCredentialSpecifics, SECURITY_CLASS_PSK);
358 } 372 }
359 NOTREACHED(); 373 NOTREACHED();
360 return ""; 374 return "";
361 } 375 }
362 376
363 #undef ASSERT_ENUM_BOUNDS 377 #undef ASSERT_ENUM_BOUNDS
364 #undef ENUM_CASE 378 #undef ENUM_CASE
365 379
366 } // namespace syncer 380 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698