OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 // Sync protocol datatype extension for user events. | 5 // Sync protocol datatype extension for user events. |
6 | 6 |
7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change | 7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change |
8 // any fields in this file. | 8 // any fields in this file. |
9 | 9 |
10 syntax = "proto2"; | 10 syntax = "proto2"; |
(...skipping 21 matching lines...) Expand all Loading... | |
32 } | 32 } |
33 // Top n languages. Typically we just log the top language, but for page that | 33 // Top n languages. Typically we just log the top language, but for page that |
34 // we're not confident about, we may log up to 3 top languages in descending | 34 // we're not confident about, we may log up to 3 top languages in descending |
35 // order. | 35 // order. |
36 repeated Language detected_languages = 1; | 36 repeated Language detected_languages = 1; |
37 // Adopted language is the final determined language. | 37 // Adopted language is the final determined language. |
38 // It will be stored only if it's different from the first detected language. | 38 // It will be stored only if it's different from the first detected language. |
39 optional string adopted_language = 2; | 39 optional string adopted_language = 2; |
40 } | 40 } |
41 | 41 |
42 // User translated a page or interacted with translate suggestion. | |
43 message Translation { | |
44 // Source language of the translation. | |
45 optional string from_language_code = 1; | |
46 // Target language of the translation. | |
47 optional string to_language_code = 2; | |
48 enum Interaction { | |
napper
2017/05/29 00:23:49
You also need:
- never translate language
- never
renjieliu1
2017/05/29 00:45:59
Done.
| |
49 UNKNOWN = 0; | |
50 ACCEPTED = 1; | |
51 REJECTED = 2; | |
52 // This happens when user scroll or click outside the UI without | |
53 // translation. | |
54 IGNORED = 3; | |
55 // This happens when user choose to close the translation window without | |
56 // translation. | |
57 DISMISSED = 4; | |
58 // User manually entered either language. | |
59 // In this case, from_language_code and to_language_code will be user chosen | |
60 // values. | |
61 MANUAL = 5; | |
62 } | |
63 optional Interaction interaction = 3; | |
64 } | |
65 | |
42 message UserEventSpecifics { | 66 message UserEventSpecifics { |
43 // Time of event, as measured on the client (unix epoch). | 67 // Time of event, as measured on the client (unix epoch). |
44 optional int64 event_time_usec = 1; | 68 optional int64 event_time_usec = 1; |
45 | 69 |
46 // The |global_id| field of the associated navigation, if there is one. | 70 // The |global_id| field of the associated navigation, if there is one. |
47 optional int64 navigation_id = 2; | 71 optional int64 navigation_id = 2; |
48 | 72 |
49 // On startup we generate a new random id to identify which FieldTrialEvents | 73 // On startup we generate a new random id to identify which FieldTrialEvents |
50 // other events belonged to. | 74 // other events belonged to. |
51 optional fixed64 session_id = 3; | 75 optional fixed64 session_id = 3; |
52 | 76 |
53 oneof event { | 77 oneof event { |
54 FieldTrialEvent field_trial_event = 4; | 78 FieldTrialEvent field_trial_event = 4; |
55 LanguageDetection language_detection = 5; | 79 LanguageDetection language_detection = 5; |
80 Translation translation = 6; | |
56 } | 81 } |
57 } | 82 } |
OLD | NEW |