Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: components/sync/protocol/user_event_specifics.proto

Issue 2875203002: UserEvent proto exploration for Translate use case. (Closed)
Patch Set: Adding proto_visitors.h change. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/sync/protocol/proto_visitors.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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";
11 11
12 option optimize_for = LITE_RUNTIME; 12 option optimize_for = LITE_RUNTIME;
13 13
14 package sync_pb; 14 package sync_pb;
15 15
16 // Language detection output.
17 message TranslateLanguageDetection {
18 // ISO 639 language code for the guessed language based on content.
19 optional string detected_language_code = 1;
20
21 // The confidence in the language guess.
22 optional float probability = 2;
23
24 // TODO(skym): Is this important to emit? I don't understand how it is used.
25 optional int32 text_bytes = 3;
26
27 // TODO(skym): This is just calculated by the client from language and
28 // probability. Do we really need to emit?
29 optional bool is_reliable = 4;
30
31 // The |detected_language_code| can be overridden by things like html lang
32 // attribute. This field should only be set if it differs from the
33 // |detected_language_code| field.
34 optional string final_language_decision = 5;
35 }
36
37 // User translated a page or interacted with translate suggestion.
38 message TranslateInteraction {
39 // ISO 639 language codes explicitly set by the user, and different from what
40 // was suggested.
41 optional string user_set_from_language_code = 1;
42 optional string user_set_to_language_code = 2;
43 enum Interaction {
44 UNKNOWN = 0;
45 ACCEPTED = 1;
46 ACCEPTED_ALWAYS = 2;
47 REJECTED = 3;
48 REJECTED_NEVER_LANGUAGE = 4;
49 REJECTED_NEVER_SITE = 5;
50 UNDO = 6;
51 IGNORED = 7;
52 }
53 optional Interaction interaction = 3;
54 }
55
16 message UserEventSpecifics { 56 message UserEventSpecifics {
17 // Time of event, as measured on the client (unix epoch). 57 // Time of event, as measured on the client (unix epoch).
18 optional int64 event_time_usec = 1; 58 optional int64 event_time_usec = 1;
19 59
20 // The |global_id| field of the associated navigation, if there is one. 60 // The |global_id| field of the associated navigation, if there is one.
21 optional int64 navigation_id = 2; 61 optional int64 navigation_id = 2;
22 62
23 // On startup we generate a new random id to identify which FieldTrialEvents 63 // On startup we generate a new random id to identify which FieldTrialEvents
24 // other events belonged to. 64 // other events belonged to.
25 optional fixed64 session_id = 3; 65 optional fixed64 session_id = 3;
26 66
27 // TODO(skym): Wrap actual event payloads in a oneof. 67 oneof event {
68 TranslateLanguageDetection translate_language_detection = 4;
69 TranslateInteraction translate_interaction = 5;
70 }
28 } 71 }
OLDNEW
« no previous file with comments | « components/sync/protocol/proto_visitors.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698