Chromium Code Reviews| 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"; |
| 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 | |
|
napper
2017/05/18 04:55:06
Add . to comment
renjieliu1
2017/05/18 05:48:21
Done.
| |
| 17 message LanguageDetection { | |
| 18 message Language { | |
| 19 optional string language_code = 1; | |
|
napper
2017/05/18 04:55:06
Can you add a comment as to what language code for
renjieliu1
2017/05/18 05:48:21
Done.
| |
| 20 optional int32 percent = 2; | |
|
napper
2017/05/18 04:55:06
int8?
renjieliu1
2017/05/18 05:48:21
int32 is the minimum we can get for proto buffer :
| |
| 21 } | |
|
napper
2017/05/18 04:55:06
Add a comment describing what percent is. Also per
renjieliu1
2017/05/18 05:48:21
how about proportion?
| |
| 22 // Top n languages. Typically we just log the top one language, but for | |
|
napper
2017/05/18 04:55:07
Change to "Typically we just log the top language"
renjieliu1
2017/05/18 05:48:21
Done.
| |
| 23 // page that we're not confident, we may log up to 3 top languages. | |
|
napper
2017/05/18 04:55:06
"a page we are not confidence about,"
renjieliu1
2017/05/18 05:48:21
Done.
| |
| 24 repeated Language languages = 1; | |
|
napper
2017/05/18 04:55:06
Would detected_languages be a better name here?
renjieliu1
2017/05/18 05:48:21
sounds good :)
| |
| 25 optional string adopted_language = 2; | |
| 26 } | |
| 27 | |
| 16 message FieldTrialEvent { | 28 message FieldTrialEvent { |
| 17 message FieldTrial { | 29 message FieldTrial { |
| 18 optional fixed32 name_id = 1; | 30 optional fixed32 name_id = 1; |
| 19 optional fixed32 group_id = 2; | 31 optional fixed32 group_id = 2; |
| 20 } | 32 } |
| 21 repeated FieldTrial field_trials = 1; | 33 repeated FieldTrial field_trials = 1; |
| 22 } | 34 } |
| 23 | 35 |
| 24 message UserEventSpecifics { | 36 message UserEventSpecifics { |
| 25 // Time of event, as measured on the client (unix epoch). | 37 // Time of event, as measured on the client (unix epoch). |
| 26 optional int64 event_time_usec = 1; | 38 optional int64 event_time_usec = 1; |
| 27 | 39 |
| 28 // The |global_id| field of the associated navigation, if there is one. | 40 // The |global_id| field of the associated navigation, if there is one. |
| 29 optional int64 navigation_id = 2; | 41 optional int64 navigation_id = 2; |
| 30 | 42 |
| 31 // On startup we generate a new random id to identify which FieldTrialEvents | 43 // On startup we generate a new random id to identify which FieldTrialEvents |
| 32 // other events belonged to. | 44 // other events belonged to. |
| 33 optional fixed64 session_id = 3; | 45 optional fixed64 session_id = 3; |
| 34 | 46 |
| 35 oneof event { FieldTrialEvent field_trial_event = 4; } | 47 oneof event { |
| 48 FieldTrialEvent field_trial_event = 4; | |
| 49 LanguageDetection translate_language_detection = 5; | |
| 50 } | |
| 36 } | 51 } |
| OLD | NEW |