| 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"; |
| 11 option java_package = "org.chromium.components.metrics"; | 11 option java_package = "org.chromium.components.metrics"; |
| 12 | 12 |
| 13 package metrics; | 13 package metrics; |
| 14 | 14 |
| 15 // Stores information about a single interaction between a user and | 15 // Stores information about a single interaction between a user and |
| 16 // the Translate UI. Contains features used by Translate Ranker for | 16 // the Translate UI. Contains features used by Translate Ranker for |
| 17 // inference, information about the ranker model and its decision, as | 17 // inference, information about the ranker model and its decision, as |
| 18 // well as user or automated feedback from the Translate UI. | 18 // well as user or automated feedback from the Translate UI. |
| 19 // Next tag: 15 | 19 // Next tag: 16 |
| 20 message TranslateEventProto { | 20 message TranslateEventProto { |
| 21 // Language strings are two or three letter codes, with sometimes an extra | 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 | 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 | 23 // https://cs.chromium.org/chromium/src/components/translate/core/browser/tran
slate_language_list.cc |
| 24 // for a list of supported languages. | 24 // for a list of supported languages. |
| 25 // Source language of the translation. | 25 // Source language of the translation. |
| 26 optional string source_language = 1; | 26 optional string source_language = 1; |
| 27 // Target language of the translation. | 27 // Target language of the translation. |
| 28 optional string target_language = 2; | 28 optional string target_language = 2; |
| 29 | 29 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // The translate UI was not shown because the web context for the translate | 129 // The translate UI was not shown because the web context for the translate |
| 130 // prompt is no longer active. | 130 // prompt is no longer active. |
| 131 WEB_CONTENTS_NOT_ACTIVE = 22; | 131 WEB_CONTENTS_NOT_ACTIVE = 22; |
| 132 // The translate UI was not shown because the user is editing a form field. | 132 // The translate UI was not shown because the user is editing a form field. |
| 133 EDITABLE_FIELD_IS_ACTIVE = 23; | 133 EDITABLE_FIELD_IS_ACTIVE = 23; |
| 134 } | 134 } |
| 135 | 135 |
| 136 // Event received from translate UI. | 136 // Event received from translate UI. |
| 137 optional EventType event_type = 10; | 137 optional EventType event_type = 10; |
| 138 | 138 |
| 139 // Decisions that have been overriden by translate ranker (e.g. |
| 140 // LANGUAGE_DISABLED_BY_AUTO_BLACKLIST). |
| 141 repeated EventType decision_overrides = 15; |
| 142 |
| 139 // The timestamp for the event, in seconds. | 143 // The timestamp for the event, in seconds. |
| 140 // This value comes from Chromium's TimeTicks::Now(), which is an abstract | 144 // This value comes from Chromium's TimeTicks::Now(), which is an abstract |
| 141 // time value that is guaranteed to always be increasing (regardless of | 145 // time value that is guaranteed to always be increasing (regardless of |
| 142 // Daylight Saving Time or any other changes to the system clock). | 146 // Daylight Saving Time or any other changes to the system clock). |
| 143 // These numbers are only comparable within a session. To sequence events | 147 // These numbers are only comparable within a session. To sequence events |
| 144 // across sessions, order by the |session_id| from the | 148 // across sessions, order by the |session_id| from the |
| 145 // ChromeUserMetricsExtension message. | 149 // ChromeUserMetricsExtension message. |
| 146 optional int64 event_timestamp_sec = 11; | 150 optional int64 event_timestamp_sec = 11; |
| 147 | 151 |
| 148 // Modified source language, if the user changed it. If changed more than | 152 // Modified source language, if the user changed it. If changed more than |
| 149 // once, we only keep the last one. | 153 // once, we only keep the last one. |
| 150 optional string modified_source_language = 12; | 154 optional string modified_source_language = 12; |
| 151 // Modified target language, if the user changed it. If changed more than | 155 // Modified target language, if the user changed it. If changed more than |
| 152 // once, we only keep the last one. | 156 // once, we only keep the last one. |
| 153 optional string modified_target_language = 13; | 157 optional string modified_target_language = 13; |
| 154 } | 158 } |
| OLD | NEW |