File: user_event_specifics.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (140 lines) | stat: -rw-r--r-- 4,664 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Sync protocol datatype extension for user events.

// If you change or add any fields in this file, update proto_visitors.h and
// potentially proto_enum_conversions.{h, cc}.

syntax = "proto2";

option java_multiple_files = true;
option java_package = "org.chromium.components.sync.protocol";

option optimize_for = LITE_RUNTIME;

package sync_pb;

import "components/sync/protocol/gaia_password_reuse.proto";

message UserEventSpecifics {
  // Time of event, as measured by client in microseconds since Windows epoch.
  optional int64 event_time_usec = 1;

  // The `global_id` field of the associated navigation, if there is one.
  optional int64 navigation_id = 2;

  // On startup we generate a new random id to identify which FieldTrialEvents
  // other events belonged to.
  optional fixed64 session_id = 3;

  // 4-7 reserved for future scalars.

  // Used for testing and debugging EventLog system.
  message Test {}

  // Language detection output.
  message LanguageDetection {
    option deprecated = true;

    message Language {
      // ISO 639 language code will be used.
      optional string language_code = 1;
      // Whether the detected language is reliable, note this is determined by
      // the CLD3.
      optional bool is_reliable = 2;
    }
    // Top n languages. Typically we just log the top language, but for page
    // that we're not confident about, we may log up to 3 top languages in
    // descending order.
    repeated Language detected_languages = 1;
    // Adopted language code is the code of final determined language.
    // It will be stored only if it's different from the first detected
    // language.
    optional string adopted_language_code = 2;
  }

  // User translated a page or interacted with translate suggestion.
  message Translation {
    option deprecated = true;

    // Source language of the translation.
    optional string from_language_code = 1;
    // Target language of the translation.
    optional string to_language_code = 2;
    enum Interaction {
      UNKNOWN = 0;
      ACCEPT = 1;
      DECLINE = 2;
      // This happens when user scroll or click outside the UI without
      // translation.
      IGNORED = 3;
      // This happens when user choose to close the translation window without
      // translation.
      DISMISSED = 4;
      // User manually entered either language.
      // In this case, from_language_code and to_language_code will be user
      // chosen values.
      MANUAL = 5;
      // User choose to revert the translation, in this case, from_language_code
      // and to_language_code will be previous chosen values.
      TRANSLATION_REVERTED = 6;
      // Automatically triggered translation.
      // User sets always translate in user settings.
      AUTO_TRANSLATION_BY_PREF = 7;
      // User navigated through a click from a translated page.
      AUTO_TRANSLATION_BY_LINK = 8;
      // Failed to initialize the translate script, this can happen for iOS due
      // to CSPs.
      INITIALIZATION_ERROR = 9;
    }
    optional Interaction interaction = 3;
  }

  // Logged when the user logs into Google, and at least once per 28d.
  message GaiaPasswordCaptured {
    enum EventTrigger {
      UNSPECIFIED = 0;
      // Event added because user logged in.
      USER_LOGGED_IN = 1;
      // Event added because 28d timer fired.
      EXPIRED_28D_TIMER = 2;
    }
    optional EventTrigger event_trigger = 1;
  }

  message FlocIdComputed {
    enum EventTrigger {
      UNSPECIFIED = 0;
      // Event added because the floc id is computed for the 1st floc session.
      NEW = 1;
      // Event added because the floc id is re-computed due to a long period of
      // time has passed since the last computation.
      REFRESHED = 2;
      // Event added because the floc id is re-computed due to history deletion.
      HISTORY_DELETE = 3;
    }
    reserved 1;
    reserved "event_trigger";

    // If not set, it means that the floc is disabled.
    optional uint64 floc_id = 2;
  }

  oneof event {
    Test test_event = 8;
    LanguageDetection language_detection_event = 10 [deprecated = true];
    Translation translation_event = 11 [deprecated = true];
    // Happens when a user types their Google account password on another site.
    GaiaPasswordReuse gaia_password_reuse_event = 104;
    GaiaPasswordCaptured gaia_password_captured_event = 15;
    FlocIdComputed floc_id_computed_event = 16;
  }

  reserved "field_trial_event";
  reserved 9;

  reserved "user_consent";
  reserved 12;
}