OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 // | |
5 // Stores information about translate UI, translate Ranekr and user interaction. | |
6 | |
7 syntax = "proto2"; | |
8 | |
9 option optimize_for = LITE_RUNTIME; | |
10 option java_outer_classname = "OmniboxEventProtos"; | |
Roger McFarlane (Chromium)
2016/10/07 19:23:16
copy paste error?
hamelphi
2016/10/07 19:29:50
Done.
| |
11 option java_package = "org.chromium.components.metrics"; | |
12 | |
13 package metrics; | |
14 | |
15 // Stores information about a single interaction between a user and | |
16 // the Translate UI. Contains features used by Translate Ranker for | |
17 // inference, information about the ranker model and its decision, as | |
18 // well as user or automated feedback from the Translate UI. | |
19 // Next tag: 14 | |
20 message TranslateEventProto { | |
21 // Language strings are two or three letter codes, with sometimes an extra | |
22 // suffix (for e.g. chinese zh-TW or zh-CN). See | |
23 // https://cs.chromium.org/chromium/src/components/translate/core/browser/tran slate_language_list.cc | |
24 // for a list of supported languages. | |
25 // Source language of the translation. | |
26 optional string source_language = 1; | |
27 // Target language of the translation. | |
28 optional string target_language = 2; | |
29 | |
30 // The following counts are extracted from TranslatePrefs. | |
31 // The number of times the user accepted a translation for the | |
32 // source language. | |
33 optional int32 accept_count = 3; | |
34 // The number of times the user declined a translation for the | |
35 // source language. | |
36 optional int32 decline_count = 4; | |
37 // The number of times the user ignored a translation for the source | |
38 // language. | |
39 optional int32 ignore_count = 5; | |
40 | |
41 // Language list from the language settings. These are languages the user | |
42 // explicitly set in the language settings. | |
43 repeated string language_list = 6; | |
44 | |
45 // The version of the translate ranker model. | |
46 optional uint32 ranker_version = 7; | |
47 | |
48 // Timestamp of when the Ranker was queried, in seconds. | |
49 // This value comes from Chromium's TimeTicks::Now(), which is an abstract | |
50 // time value that is guaranteed to always be increasing (regardless of | |
51 // Daylight Saving Time or any other changes to the system clock). | |
52 // These numbers are only comparable within a session. To sequence events | |
53 // across sessions, order by the |session_id| from the | |
54 // ChromeUserMetricsExtension message. | |
55 optional int64 ranker_request_timestamp_sec = 8; | |
56 | |
57 // The decision of translate ranker whether we should show the UI or not. | |
58 enum RankerResponse { | |
59 SHOW = 0; | |
60 DONT_SHOW = 1; | |
61 NOT_QUERIED = 2; | |
62 } | |
63 optional RankerResponse ranker_response = 9; | |
64 | |
65 // The action performed by the user in the translate UI. | |
66 enum EventType { | |
67 // The feedback event does not correspond to any of the enumerated | |
68 // cases. | |
69 UNKNOWN = 0; | |
70 | |
71 // User actions. | |
72 // The user clicked 'Nope' in the UI. | |
73 USER_DECLINE = 1; | |
74 // The user clicked 'Translate' in the UI. | |
75 USER_ACCEPT = 2; | |
76 // The user explicitly closed the UI. | |
77 USER_DISMISS = 3; | |
78 // The user ignored the UI. | |
79 USER_IGNORE = 4; | |
80 // The user asked to never translate this source language. | |
81 USER_NEVER_TRANSLATE_LANGUAGE = 5; | |
82 // The user asked to never translate on this site. | |
83 USER_NEVER_TRANSLATE_SITE = 6; | |
84 // The user asked to always translate this source language. | |
85 USER_ALWAYS_TRANSLATE_LANGUAGE = 7; | |
86 // The user explicitly asked for a translation from the context menu. | |
87 USER_CONTEXT_MENU_TRANSLATE = 8; | |
88 // The user reverted the translation. | |
89 USER_REVERT = 9; | |
90 | |
91 // Automated feedback. | |
92 // An automatic translation was triggered. | |
93 AUTOMATICALLY_TRANSLATED = 10; | |
94 // The translation was not offered because translate is disabled | |
95 // globally in the user preferences. | |
96 DISABLED_BY_PREF = 11; | |
97 // The translation was not offered because this language is | |
98 // blacklisted in the user config. | |
99 LANGUAGE_DISABLED_BY_USER_CONFIG = 12; | |
100 // The translation was not offered because this language or URL is | |
101 // blacklisted in the user config. | |
102 URL_DISABLED_BY_USER_CONFIG = 13; | |
103 // The translation was not offered because this language has been denied too | |
104 // many times. | |
105 LANGUAGE_DISABLED_BY_AUTO_BLACKLIST = 14; | |
106 // The translation was not offered because Ranker dismissed it. | |
107 DISABLED_BY_RANKER = 15; | |
108 // The translation was not offered because the source or target | |
109 // language is not supported. | |
110 UNSUPPORTED_LANGUAGE = 16; | |
111 // The translation was not offered because the URL is not | |
112 // supported (e.g. New Tab Page). | |
113 UNSUPPORTED_URL = 17; | |
114 } | |
115 | |
116 // Feedback event received from translate UI. If several feedback are received | |
Roger McFarlane (Chromium)
2016/10/07 19:21:00
s/Feedback event/Event/
s/If several feedback are/
hamelphi
2016/10/07 19:29:50
Done.
| |
117 // in a given translate UI interaction, we only keep the last one. | |
118 optional EventType feedback_event = 10; | |
Roger McFarlane (Chromium)
2016/10/07 19:21:00
s/feedback_event/event_type/
hamelphi
2016/10/07 19:29:50
Done.
| |
119 | |
120 // The timestamp for the event, in seconds. | |
121 // This value comes from Chromium's TimeTicks::Now(), which is an abstract | |
122 // time value that is guaranteed to always be increasing (regardless of | |
123 // Daylight Saving Time or any other changes to the system clock). | |
124 // These numbers are only comparable within a session. To sequence events | |
125 // across sessions, order by the |session_id| from the | |
126 // ChromeUserMetricsExtension message. | |
127 optional int64 feedback_timestamp_sec = 11; | |
Roger McFarlane (Chromium)
2016/10/07 19:21:01
drop the feedback prefix?
hamelphi
2016/10/07 19:29:50
Done.
| |
128 | |
129 // Modified source language, if the user changed it. If changed more than | |
130 // once, we only keep the last one. | |
131 optional string modified_source_language = 12; | |
132 // Modified target language, if the user changed it. If changed more than | |
133 // once, we only keep the last one. | |
134 optional string modified_target_language = 13; | |
135 } | |
OLD | NEW |