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

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

Issue 2875203002: UserEvent proto exploration for Translate use case. (Closed)
Patch Set: Adding proto_visitors.h change. Created 3 years, 7 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 switch (state) { 340 switch (state) {
341 ENUM_CASE(sync_pb::TabNavigation, PASSWORD_STATE_UNKNOWN); 341 ENUM_CASE(sync_pb::TabNavigation, PASSWORD_STATE_UNKNOWN);
342 ENUM_CASE(sync_pb::TabNavigation, NO_PASSWORD_FIELD); 342 ENUM_CASE(sync_pb::TabNavigation, NO_PASSWORD_FIELD);
343 ENUM_CASE(sync_pb::TabNavigation, HAS_PASSWORD_FIELD); 343 ENUM_CASE(sync_pb::TabNavigation, HAS_PASSWORD_FIELD);
344 } 344 }
345 NOTREACHED(); 345 NOTREACHED();
346 return ""; 346 return "";
347 } 347 }
348 348
349 const char* ProtoEnumToString( 349 const char* ProtoEnumToString(
350 sync_pb::TranslateInteraction::Interaction interaction) {
351 ASSERT_ENUM_BOUNDS(sync_pb::TranslateInteraction, Interaction, UNKNOWN,
352 IGNORED);
353 switch (interaction) {
354 ENUM_CASE(sync_pb::TranslateInteraction, UNKNOWN);
355 ENUM_CASE(sync_pb::TranslateInteraction, ACCEPTED);
356 ENUM_CASE(sync_pb::TranslateInteraction, ACCEPTED_ALWAYS);
357 ENUM_CASE(sync_pb::TranslateInteraction, REJECTED);
358 ENUM_CASE(sync_pb::TranslateInteraction, REJECTED_NEVER_LANGUAGE);
359 ENUM_CASE(sync_pb::TranslateInteraction, REJECTED_NEVER_SITE);
360 ENUM_CASE(sync_pb::TranslateInteraction, UNDO);
361 ENUM_CASE(sync_pb::TranslateInteraction, IGNORED);
362 }
363 NOTREACHED();
364 return "";
365 }
366
367 const char* ProtoEnumToString(
350 sync_pb::ReadingListSpecifics::ReadingListEntryStatus status) { 368 sync_pb::ReadingListSpecifics::ReadingListEntryStatus status) {
351 ASSERT_ENUM_BOUNDS(sync_pb::ReadingListSpecifics, ReadingListEntryStatus, 369 ASSERT_ENUM_BOUNDS(sync_pb::ReadingListSpecifics, ReadingListEntryStatus,
352 UNREAD, UNSEEN); 370 UNREAD, UNSEEN);
353 switch (status) { 371 switch (status) {
354 ENUM_CASE(sync_pb::ReadingListSpecifics, UNREAD); 372 ENUM_CASE(sync_pb::ReadingListSpecifics, UNREAD);
355 ENUM_CASE(sync_pb::ReadingListSpecifics, READ); 373 ENUM_CASE(sync_pb::ReadingListSpecifics, READ);
356 ENUM_CASE(sync_pb::ReadingListSpecifics, UNSEEN); 374 ENUM_CASE(sync_pb::ReadingListSpecifics, UNSEEN);
357 } 375 }
358 NOTREACHED(); 376 NOTREACHED();
359 return ""; 377 return "";
360 } 378 }
361 379
362 #undef ASSERT_ENUM_BOUNDS 380 #undef ASSERT_ENUM_BOUNDS
363 #undef ENUM_CASE 381 #undef ENUM_CASE
364 382
365 } // namespace syncer 383 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/protocol/proto_enum_conversions.h ('k') | components/sync/protocol/proto_memory_estimations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698