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

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

Issue 2892553003: Initial proto for language detection. (Closed)
Patch Set: add comment 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 LanguageDetection {
18 message Language {
19 // ISO 639 language code will be used.
20 optional string language_code = 1;
21 // Whether the detected language is reliable, note this is determined by
22 // the CLD3.
23 optional bool is_reliable = 2;
24 }
25 // Top n languages. Typically we just log the top language, but for page that
skym 2017/05/19 03:22:35 Is it correct to assume that this is an ordered li
renjieliu1 2017/05/19 04:10:17 yes :)
26 // we're not confident about, we may log up to 3 top languages.
27 repeated Language detected_languages = 1;
28 // Adopted language is the final determined language.
29 optional string adopted_language = 2;
napper 2017/05/19 03:30:58 What if we only specify the adopted language if it
renjieliu1 2017/05/19 04:10:17 Done.
30 }
31
16 message FieldTrialEvent { 32 message FieldTrialEvent {
skym 2017/05/19 03:22:35 Can you put this above the translate message defin
renjieliu1 2017/05/19 04:10:16 Done.
17 message FieldTrial { 33 message FieldTrial {
18 optional fixed32 name_id = 1; 34 optional fixed32 name_id = 1;
19 optional fixed32 group_id = 2; 35 optional fixed32 group_id = 2;
20 } 36 }
21 repeated FieldTrial field_trials = 1; 37 repeated FieldTrial field_trials = 1;
22 } 38 }
23 39
24 message UserEventSpecifics { 40 message UserEventSpecifics {
25 // Time of event, as measured on the client (unix epoch). 41 // Time of event, as measured on the client (unix epoch).
26 optional int64 event_time_usec = 1; 42 optional int64 event_time_usec = 1;
27 43
28 // The |global_id| field of the associated navigation, if there is one. 44 // The |global_id| field of the associated navigation, if there is one.
29 optional int64 navigation_id = 2; 45 optional int64 navigation_id = 2;
30 46
31 // On startup we generate a new random id to identify which FieldTrialEvents 47 // On startup we generate a new random id to identify which FieldTrialEvents
32 // other events belonged to. 48 // other events belonged to.
33 optional fixed64 session_id = 3; 49 optional fixed64 session_id = 3;
34 50
35 oneof event { FieldTrialEvent field_trial_event = 4; } 51 oneof event {
52 FieldTrialEvent field_trial_event = 4;
53 LanguageDetection language_detection = 5;
54 }
36 } 55 }
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