summaryrefslogtreecommitdiff
path: root/chromium/components/metrics/proto/cast_logs.proto
blob: 951dfb247673cc8549d257df8374f65300fd9274 (plain)
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Cast-enabled device specific log data included in ChromeUserMetricsExtension.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;
option java_outer_classname = "CastLogsProtos";
option java_package = "org.chromium.components.metrics";

package metrics;

// Next tag: 7
message CastLogsProto {
  // Cast specific device information.
  // Next tag: 5
  message CastDeviceInfo {
    // The product type of Cast device sent from Cast-enabled devices.
    // Next tag: 5
    enum CastProductType {
      CAST_PRODUCT_TYPE_UNKNOWN = 0;
      CAST_PRODUCT_TYPE_CHROMECAST = 1;
      CAST_PRODUCT_TYPE_AUDIO = 3;
      CAST_PRODUCT_TYPE_ANDROID_TV = 4;
    }
    optional CastProductType type = 1;

    // The hardware revision of each product.
    optional string hardware_revision = 2;

    // The manufacturer of Cast device, this value is empty when the device
    // is manufactured by Google.
    optional string manufacturer = 3;

    // The model of the Cast device.
    optional string model = 4;
  }
  // The device sends this information at least once per day.
  optional CastDeviceInfo cast_device_info = 1;

  // Information about Cast connection between sender application and
  // Cast-enabled device.
  // Next tag: 4
  message CastConnectionInfo {
    optional fixed32 transport_connection_id = 1;

    optional fixed32 virtual_connection_id = 2;

    // This message describes a detail sender device and sdk. Those are
    // parsed from the user agent string sent from sender sdk during connection.
    // Next tag: 9
    message SenderInfo {
      // The identifier for the sender device, that is not tied any kind of
      // device id outside of UMA, and this id is reset when user resets sender
      // device.
      optional fixed64 sender_device_id = 1;

      // SDK type the sender application was using.
      // Next tag: 3
      enum SDKType {
        SDK_UNKNOWN = 0;

        // Native SDK type,
        // E.G. Android sdk, iOS sdk.
        SDK_NATIVE = 1;

        // SDK via Chrome extension.
        SDK_CHROME_EXTENSION = 2;
      }
      optional SDKType sdk_type = 2;

      // Version of sender sdk/extension used to connection.
      optional string version = 3;

      // Chrome browser version where the Chrome extension running.
      // Only Chrome extension sends this information.
      optional string chrome_browser_version = 4;

      // Platform of sender device.
      // Next tag: 7
      enum Platform {
        // Any platform other then cases below.
        PLATFORM_OTHER = 0;

        PLATFORM_ANDROID = 1;
        PLATFORM_IOS = 2;
        PLATFORM_WINDOWS = 3;
        PLATFORM_OSX = 4;
        PLATFORM_CHROMEOS = 5;
        PLATFORM_LINUX = 6;
      }
      optional Platform platform = 5;

      // Sender device system version.
      optional string system_version = 6;

      // What type of connection type used to establish between sender and
      // receiver.
      enum ConnectionType {
        CONNECTION_TYPE_UNKNOWN = 0;
        CONNECTION_TYPE_LOCAL = 1;
        CONNECTION_TYPE_RELAY = 2;
      }
      optional ConnectionType transport_connection_type = 7;

      // Sender device model.
      optional string model = 8;
    }
    optional SenderInfo sender_info = 3;
  }

  // Virtual connection established between sender application and Cast device.
  repeated CastConnectionInfo cast_connection_info = 2;

  // Stores Cast-enabled device specific events with a various context data.
  // Next tag: 10
  message CastEventProto {
    // The name of the action, hashed by same logic used to hash user action
    // event and histogram.
    optional fixed64 name_hash = 1;

    // The timestamp for the event, in milliseconds.
    optional int64 time_msec = 2;

    // The Cast receiver app ID related with this event.
    optional fixed32 app_id = 3;

    // The identifier for receiver application session.
    optional fixed64 application_session_id = 4;

    // Receiver side Cast SDK version.
    optional fixed64 cast_receiver_version = 5;

    // Cast MPL version.
    optional fixed64 cast_mpl_version = 9;

    // transport_connection_id related with this event.
    optional fixed32 transport_connection_id = 6;

    // virtual_connection_id related with this event.
    optional fixed32 virtual_connection_id = 7;

    // An optional value for the associated event
    optional int64 value = 8;

    // An optional value for the multi-room group uuid.
    optional fixed64 group_uuid = 10;
  }
  repeated CastEventProto cast_event = 3;

  // Virtual release track for device.
  optional fixed32 virtual_release_track = 4;

  // Cast specific device information which is expected to change over time.
  // Next tag: 2
  message CastDeviceMutableInfo {
    // This is the last type of reboot the device encountered
    // Next tag: 9
    enum RebootType {
      REBOOT_TYPE_UNKNOWN = 0;
      REBOOT_TYPE_FORCED = 1;
      REBOOT_TYPE_API = 2;
      REBOOT_TYPE_NIGHTLY = 3;
      REBOOT_TYPE_OTA = 4;
      REBOOT_TYPE_WATCHDOG = 5;
      REBOOT_TYPE_PROCESS_MANAGER = 6;
      REBOOT_TYPE_CRASH_UPLOADER = 7;
      REBOOT_TYPE_FDR = 8;
    }
    optional RebootType last_reboot_type = 1;

    // System version which the cast_shell is running.
    optional fixed64 system_build_number = 2;
  }
  optional CastDeviceMutableInfo cast_device_mutable_info = 5;

  // Unique identifier that is randomly generated on first setup, on re-setup
  // (FDR), and when user opted-in from opted-out status. If user is opted-out
  // then this field should not be set.
  // This is used for joining logs from Cast sender SDK to evaluate Cast
  // sender/receiver communication quality.
  optional fixed64 receiver_metrics_id = 6;
}