OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 // Stores information about translate UI, translate Ranekr and user interaction. | 5 // Stores information about translate UI, translate Ranekr and user interaction. |
6 | 6 |
7 syntax = "proto2"; | 7 syntax = "proto2"; |
8 | 8 |
9 option optimize_for = LITE_RUNTIME; | 9 option optimize_for = LITE_RUNTIME; |
10 option java_outer_classname = "TranslateEventProtos"; | 10 option java_outer_classname = "TranslateEventProtos"; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 | 60 |
61 // The decision of translate ranker whether we should show the UI or not. | 61 // The decision of translate ranker whether we should show the UI or not. |
62 enum RankerResponse { | 62 enum RankerResponse { |
63 SHOW = 0; | 63 SHOW = 0; |
64 DONT_SHOW = 1; | 64 DONT_SHOW = 1; |
65 NOT_QUERIED = 2; | 65 NOT_QUERIED = 2; |
66 } | 66 } |
67 optional RankerResponse ranker_response = 9; | 67 optional RankerResponse ranker_response = 9; |
68 | 68 |
69 // The action performed by the user in the translate UI. | 69 // The action performed by the user in the translate UI. |
70 // Next tag 27. | |
70 enum EventType { | 71 enum EventType { |
71 // The feedback event does not correspond to any of the enumerated | 72 // The feedback event does not correspond to any of the enumerated |
72 // cases. | 73 // cases. |
73 UNKNOWN = 0; | 74 UNKNOWN = 0; |
74 | 75 |
75 // User actions. | 76 // User actions. |
76 // The user clicked 'Nope' in the UI. | 77 // The user clicked 'Nope' in the UI. |
77 USER_DECLINE = 1; | 78 USER_DECLINE = 1; |
78 // The user clicked 'Translate' in the UI. | 79 // The user clicked 'Translate' in the UI. |
79 USER_ACCEPT = 2; | 80 USER_ACCEPT = 2; |
80 // The user explicitly closed the UI. | 81 // The user explicitly closed the UI. |
81 USER_DISMISS = 3; | 82 USER_DISMISS = 3; |
82 // The user ignored the UI. | 83 // The user ignored the UI. |
83 USER_IGNORE = 4; | 84 USER_IGNORE = 4; |
84 // The user asked to never translate this source language. | 85 // The user asked to never translate this source language. |
85 USER_NEVER_TRANSLATE_LANGUAGE = 5; | 86 USER_NEVER_TRANSLATE_LANGUAGE = 5; |
86 // The user asked to never translate on this site. | 87 // The user asked to never translate on this site. |
87 USER_NEVER_TRANSLATE_SITE = 6; | 88 USER_NEVER_TRANSLATE_SITE = 6; |
88 // The user asked to always translate this source language. | 89 // The user asked to always translate this source language. |
89 USER_ALWAYS_TRANSLATE_LANGUAGE = 7; | 90 USER_ALWAYS_TRANSLATE_LANGUAGE = 7; |
90 // The user explicitly asked for a translation from the context menu. | 91 // The user explicitly asked for a translation from the context menu. |
91 USER_CONTEXT_MENU_TRANSLATE = 8; | 92 USER_CONTEXT_MENU_TRANSLATE = 8; |
92 // The user reverted the translation. | 93 // The user reverted the translation. |
93 USER_REVERT = 9; | 94 USER_REVERT = 9; |
94 | 95 |
96 // Deprecated. Use AUTO_TRANSLATION_BY_PREF or AUTO_TRANSLATION_BY_LINK | |
97 // instead. | |
98 AUTOMATICALLY_TRANSLATED = 10; | |
95 // Automated feedback. | 99 // Automated feedback. |
96 // An automatic translation was triggered. | 100 // An automatic translation was triggered. |
97 AUTOMATICALLY_TRANSLATED = 10; | 101 AUTO_TRANSLATION_BY_PREF = 25; |
groby-ooo-7-16
2017/06/20 04:17:17
Could you comment on what the difference between t
renjieliu1
2017/06/20 04:51:38
Done.
| |
102 AUTO_TRANSLATION_BY_LINK = 26; | |
98 // The translation was not offered because translate is disabled | 103 // The translation was not offered because translate is disabled |
99 // globally in the user preferences. | 104 // globally in the user preferences. |
100 DISABLED_BY_PREF = 11; | 105 DISABLED_BY_PREF = 11; |
101 // The translation was not offered because this language is | 106 // The translation was not offered because this language is |
102 // blacklisted in the user config. | 107 // blacklisted in the user config. |
103 LANGUAGE_DISABLED_BY_USER_CONFIG = 12; | 108 LANGUAGE_DISABLED_BY_USER_CONFIG = 12; |
104 // The translation was not offered because this language or URL is | 109 // The translation was not offered because this language or URL is |
105 // blacklisted in the user config. | 110 // blacklisted in the user config. |
106 URL_DISABLED_BY_USER_CONFIG = 13; | 111 URL_DISABLED_BY_USER_CONFIG = 13; |
107 // The translation was not offered because this language has been denied too | 112 // The translation was not offered because this language has been denied too |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
152 // ChromeUserMetricsExtension message. | 157 // ChromeUserMetricsExtension message. |
153 optional int64 event_timestamp_sec = 11; | 158 optional int64 event_timestamp_sec = 11; |
154 | 159 |
155 // Modified source language, if the user changed it. If changed more than | 160 // Modified source language, if the user changed it. If changed more than |
156 // once, we only keep the last one. | 161 // once, we only keep the last one. |
157 optional string modified_source_language = 12; | 162 optional string modified_source_language = 12; |
158 // Modified target language, if the user changed it. If changed more than | 163 // Modified target language, if the user changed it. If changed more than |
159 // once, we only keep the last one. | 164 // once, we only keep the last one. |
160 optional string modified_target_language = 13; | 165 optional string modified_target_language = 13; |
161 } | 166 } |
OLD | NEW |