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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: components/sync/protocol/proto_enum_conversions.cc
diff --git a/components/sync/protocol/proto_enum_conversions.cc b/components/sync/protocol/proto_enum_conversions.cc
index cc2459cfafb8c7d66ad5df7d5d7338e7a56d9277..3f1f176eca1cb417ffb47aba08ce20a0afb82729 100644
--- a/components/sync/protocol/proto_enum_conversions.cc
+++ b/components/sync/protocol/proto_enum_conversions.cc
@@ -346,6 +346,24 @@ const char* ProtoEnumToString(sync_pb::TabNavigation::PasswordState state) {
return "";
}
+const char* ProtoEnumToString(
+ sync_pb::TranslateInteraction::Interaction interaction) {
+ ASSERT_ENUM_BOUNDS(sync_pb::TranslateInteraction, Interaction, UNKNOWN,
+ IGNORED);
+ switch (interaction) {
+ ENUM_CASE(sync_pb::TranslateInteraction, UNKNOWN);
+ ENUM_CASE(sync_pb::TranslateInteraction, ACCEPTED);
+ ENUM_CASE(sync_pb::TranslateInteraction, ACCEPTED_ALWAYS);
+ ENUM_CASE(sync_pb::TranslateInteraction, REJECTED);
+ ENUM_CASE(sync_pb::TranslateInteraction, REJECTED_NEVER_LANGUAGE);
+ ENUM_CASE(sync_pb::TranslateInteraction, REJECTED_NEVER_SITE);
+ ENUM_CASE(sync_pb::TranslateInteraction, UNDO);
+ ENUM_CASE(sync_pb::TranslateInteraction, IGNORED);
+ }
+ NOTREACHED();
+ return "";
+}
+
const char* ProtoEnumToString(
sync_pb::ReadingListSpecifics::ReadingListEntryStatus status) {
ASSERT_ENUM_BOUNDS(sync_pb::ReadingListSpecifics, ReadingListEntryStatus,
« 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