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

Unified Diff: components/sync/protocol/user_event_specifics.proto

Issue 2938813003: [Sync] Nest UserEvent message classes within UserEventSpecifics. (Closed)
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: components/sync/protocol/user_event_specifics.proto
diff --git a/components/sync/protocol/user_event_specifics.proto b/components/sync/protocol/user_event_specifics.proto
index a2648f0b9851eed92b8c7a58320580309629f01c..d6a8066ba93eebcb1638d56f464f6152bf5d0ae4 100644
--- a/components/sync/protocol/user_event_specifics.proto
+++ b/components/sync/protocol/user_event_specifics.proto
@@ -13,64 +13,6 @@ option optimize_for = LITE_RUNTIME;
package sync_pb;
-message FieldTrial {
- message FieldTrialPair {
- optional fixed32 name_id = 1;
- optional fixed32 group_id = 2;
- }
- repeated FieldTrialPair field_trial_pairs = 1;
-}
-
-// Language detection output.
-message LanguageDetection {
- message Language {
- // ISO 639 language code will be used.
- optional string language_code = 1;
- // Whether the detected language is reliable, note this is determined by
- // the CLD3.
- optional bool is_reliable = 2;
- }
- // Top n languages. Typically we just log the top language, but for page that
- // we're not confident about, we may log up to 3 top languages in descending
- // order.
- repeated Language detected_languages = 1;
- // Adopted language code is the code of final determined language.
- // It will be stored only if it's different from the first detected language.
- optional string adopted_language_code = 2;
-}
-
-// User translated a page or interacted with translate suggestion.
-message Translation {
- // Source language of the translation.
- optional string from_language_code = 1;
- // Target language of the translation.
- optional string to_language_code = 2;
- enum Interaction {
- UNKNOWN = 0;
- ACCEPT = 1;
- DECLINE = 2;
- // This happens when user scroll or click outside the UI without
- // translation.
- IGNORED = 3;
- // This happens when user choose to close the translation window without
- // translation.
- DISMISSED = 4;
- // User manually entered either language.
- // In this case, from_language_code and to_language_code will be user chosen
- // values.
- MANUAL = 5;
- // User choose to revert the translation, in this case, from_language_code
- // and to_language_code will be previous chosen values.
- TRANSLATION_REVERTED = 6;
- // Automatically triggered translation.
- // User sets always translate in user settings.
- AUTO_TRANSLATION_BY_PREF = 7;
- // User navigated through a click from a translated page.
- AUTO_TRANSLATION_BY_LINK = 8;
- }
- optional Interaction interaction = 3;
-}
-
message UserEventSpecifics {
// Time of event, as measured by client in microseconds since Windows epoch.
optional int64 event_time_usec = 1;
@@ -87,6 +29,67 @@ message UserEventSpecifics {
// Used for testing and debugging EventLog system.
message Test {}
+ // Reports field trial membership for the subset of trials that have been
+ // registered as important to other event types.
+ message FieldTrial {
+ message FieldTrialPair {
+ optional fixed32 name_id = 1;
+ optional fixed32 group_id = 2;
+ }
+ repeated FieldTrialPair field_trial_pairs = 1;
+ }
+
+ // Language detection output.
+ message LanguageDetection {
+ message Language {
+ // ISO 639 language code will be used.
+ optional string language_code = 1;
+ // Whether the detected language is reliable, note this is determined by
+ // the CLD3.
+ optional bool is_reliable = 2;
+ }
+ // Top n languages. Typically we just log the top language, but for page
+ // that we're not confident about, we may log up to 3 top languages in
+ // descending order.
+ repeated Language detected_languages = 1;
+ // Adopted language code is the code of final determined language.
+ // It will be stored only if it's different from the first detected
+ // language.
+ optional string adopted_language_code = 2;
+ }
+
+ // User translated a page or interacted with translate suggestion.
+ message Translation {
+ // Source language of the translation.
+ optional string from_language_code = 1;
+ // Target language of the translation.
+ optional string to_language_code = 2;
+ enum Interaction {
+ UNKNOWN = 0;
+ ACCEPT = 1;
+ DECLINE = 2;
+ // This happens when user scroll or click outside the UI without
+ // translation.
+ IGNORED = 3;
+ // This happens when user choose to close the translation window without
+ // translation.
+ DISMISSED = 4;
+ // User manually entered either language.
+ // In this case, from_language_code and to_language_code will be user
+ // chosen values.
+ MANUAL = 5;
+ // User choose to revert the translation, in this case, from_language_code
+ // and to_language_code will be previous chosen values.
+ TRANSLATION_REVERTED = 6;
+ // Automatically triggered translation.
+ // User sets always translate in user settings.
+ AUTO_TRANSLATION_BY_PREF = 7;
+ // User navigated through a click from a translated page.
+ AUTO_TRANSLATION_BY_LINK = 8;
+ }
+ optional Interaction interaction = 3;
+ }
+
oneof event {
Test test_event = 8;
FieldTrial field_trial_event = 9;
« no previous file with comments | « components/sync/protocol/proto_visitors.h ('k') | components/translate/core/common/language_detection_logging_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698