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 = "TranslateEventProtos"; |
| 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 // Event received from translate UI. |
| 117 optional EventType event_type = 10; |
| 118 |
| 119 // The timestamp for the event, in seconds. |
| 120 // This value comes from Chromium's TimeTicks::Now(), which is an abstract |
| 121 // time value that is guaranteed to always be increasing (regardless of |
| 122 // Daylight Saving Time or any other changes to the system clock). |
| 123 // These numbers are only comparable within a session. To sequence events |
| 124 // across sessions, order by the |session_id| from the |
| 125 // ChromeUserMetricsExtension message. |
| 126 optional int64 event_timestamp_sec = 11; |
| 127 |
| 128 // Modified source language, if the user changed it. If changed more than |
| 129 // once, we only keep the last one. |
| 130 optional string modified_source_language = 12; |
| 131 // Modified target language, if the user changed it. If changed more than |
| 132 // once, we only keep the last one. |
| 133 optional string modified_target_language = 13; |
| 134 } |
OLD | NEW |