File: interface.proto

package info (click to toggle)
chromium 138.0.7204.183-1~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 6,080,960 kB
  • sloc: cpp: 34,937,079; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,954; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,811; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (233 lines) | stat: -rw-r--r-- 8,945 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
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package reporting;

import "components/reporting/proto/synced/health.proto";
import "components/reporting/proto/synced/record_constants.proto";
import "components/reporting/proto/synced/record.proto";
import "components/reporting/proto/synced/status.proto";

// ------------ CLIENT/USER REQUEST AND RESPONSES -----------------
// EnqueueRecordRequest enqueues records for encryption,
// storage, and upload.
message EnqueueRecordRequest {
  // Record the user wants to enqueue.
  optional Record record = 1;

  // Priority from
  // //chrome/cros/reporting/api/proto/synced/record_constants.proto
  // indicates what priority queue the record should be included in.
  optional Priority priority = 2;

  // Flag indicating health data logging state (`true` means "enable logging").
  // Can only be present when originating from Ash.
  optional bool health_data_logging_enabled = 3 [default = false];
}

// EnqueueRecordResponse indicates the enqueue success or
// failure.
message EnqueueRecordResponse {
  // Indicates success or failure of EnqueueRecordRequest.
  // Specific error codes indicate if a retry is appropriate.
  // Expected errors:
  //   FAILED_PRECONDITION:
  //     "The daemon is unable to locate the public key for record encryption."
  //     - Not Retryable
  //   FAILED_PRECONDITION:
  //     "The daemon has insufficient permissions to read/write from/to disk"
  //     - Not Retryable
  //   FAILED_PRECONDITION:
  //     "Policy controlling daemon is either unset or off."
  //     - Not Retryable
  //   UNAVAILABLE:
  //     "The daemon is still starting."
  //     - Retryable
  //   RESOURCE_EXHAUSTED:
  //     "The daemon has no available threads for processing"
  //     - Retryable
  optional StatusProto status = 1;

  // Portion of debug logging (if enabled).
  optional ERPHealthData health_data = 2;
}

// FlushPriorityRequest requests that the indicated priority
// queue is flushed (records are uploaded to the server).
message FlushPriorityRequest {
  // Priority of the desired queue. Defaults to MANUAL_BATCH.
  optional Priority priority = 1 [default = MANUAL_BATCH];

  // Flag indicating health data logging state (`true` means "enable logging").
  // Can only be present when originating from Ash.
  optional bool health_data_logging_enabled = 2 [default = false];
}

// FlushPriorityResponse indicates success or failure of
// processing FlushPriorityRequest.
message FlushPriorityResponse {
  // Indicates success or failure of FlushPriorityRequest.
  // Specific error codes indicate if a retry is appropriate.
  // Expected errors:
  //   FAILED_PRECONDITION:
  //     "The daemon is unable to locate the public key for record encryption."
  //     - Not Retryable
  //   FAILED_PRECONDITION:
  //     "The daemon has insufficient permissions to read/write from/to disk"
  //     - Not Retryable
  //   FAILED_PRECONDITION:
  //     "Policy controlling daemon is either unset or off."
  //     - Not Retryable
  //   UNAVAILABLE:
  //     "The daemon is still starting."
  //     - Retryable
  optional StatusProto status = 1;

  // Portion of debug logging (if enabled).
  optional ERPHealthData health_data = 2;
}

// --------------- CHROME CALLS AND RESPONSES -------------------
// Daemon DBus call to Chrome for uploading records. The Daemon sends a
// batch of records, and the Upload Service accepts as many (but at least
// one) as it can for upload. Records not sent for upload can be sent again
// at a later time.
message UploadEncryptedRecordRequest {
  repeated EncryptedRecord encrypted_record = 1;

  // Must be either true or absent. If true, server should send the server's
  // public values in the next response. It corresponds to the
  // "attachEncryptionSettings" field in the payload.
  optional bool need_encryption_keys = 2;

  // The remaining storage capacity in bytes.
  optional uint64 remaining_storage_capacity = 3;

  // The rate (bytes/sec) at which new events are added to the storage.
  optional uint64 new_events_rate = 4;

  // Portion of debug logging (if enabled).
  optional ERPHealthData health_data = 5;
}

message UploadEncryptedRecordResponse {
  // Status indicates if the records will be uploaded.
  // Expected Errors:
  //    UNAVAILABLE:
  //      "No internet connection. Unable to upload records at this time."
  //      - Retryable
  //    FAILED_PRECONDITION:
  //      "Policy controlling reporting upload is unset or off."
  //      - Not Retryable
  optional StatusProto status = 1;

  // Flag indicating that missived should be disabled, if set to `true`:
  // for example, because Chrome got a bad (dummy) API key - see b/239253702.
  optional bool disable = 2 [default = false];

  // Flag indicating health data logging state (`true` means "enable logging").
  // Can only be present when originating from Ash.
  optional bool health_data_logging_enabled = 3 [default = false];

  // List of sequence ids that are cached by Ash.
  // `missived` will not send to Ash the records with listed sequence ids.
  // Backwards compatibility: absent from responses by earlier Ash builds and
  // ignored by earlier `missived` builds.
  repeated int64 cached_events_seq_ids = 4;
}

// ConfirmRecordUploadRequest is expected to only come from
// Chrome and indicates the record with the provided
// SequenceInformation successfully uploaded. It is
// only sent by Chrome after a successful upload.
message ConfirmRecordUploadRequest {
  // SequenceInformation of the successfully uploaded record.
  // SequenceInformation is part of the UploadEncryptedRecordRequest
  // sent to Chrome.
  optional SequenceInformation sequence_information = 1;

  // If true, daemon should update to the provided sequence_information
  // regardless of its current state.
  optional bool force_confirm = 2;

  // Flag indicating health data logging state (`true` means "enable logging").
  // Can only be present when originating from Ash.
  optional bool health_data_logging_enabled = 3 [default = false];
}

// ConfirmRecordUploadResponse indicates that the request was
// successfully resolved. In the event that the daemon is unable
// to process the ConfirmRecordUploadeRequest it is safe to drop it.
// On the next upload, the server will ignore all records with
// SequenceInformation lower than the highest it has processed.
// The next ConfirmRecordUploadRequest will ensure that they are
// deleted from disk. Some data transmission will be repeated, but
// data will not be lost.
message ConfirmRecordUploadResponse {
  // Indicates success or failure of ConfirmRecordUploadRequest.
  // Specific error codes indicate if a retry is appropriate.
  // Expected errors:
  //   FAILED_PRECONDITION:
  //     "The daemon has insufficient permissions to read/write from/to disk"
  //     - Not Retryable
  //   FAILED_PRECONDITION:
  //     "Policy controlling daemon is either unset or off."
  //     - Not Retryable
  //   UNAVAILABLE:
  //     "The daemon is still starting."
  //     - Retryable
  optional StatusProto status = 1;

  // Portion of debug logging (if enabled).
  optional ERPHealthData health_data = 2;
}

// UpdateEncryptionKeyRequest sends a SignedEncryptionInfo to the daemon.
message UpdateEncryptionKeyRequest {
  optional SignedEncryptionInfo signed_encryption_info = 1;
}

message UpdateEncryptionKeyResponse {
  // Indicates success or failure of UpdateEncryptionKeyRequest.
  // Specific error codes indicate if a retry is appropriate.
  // Expected errors:
  //   FAILED_PRECONDITION:
  //     "The daemon has insufficient permissions to read/write from/to disk"
  //     - Not Retryable
  //   FAILED_PRECONDITION:
  //     "Policy controlling daemon is either unset or off."
  //     - Not Retryable
  //   UNAVAILABLE:
  //     "The daemon is still starting."
  //     - Retryable
  optional StatusProto status = 1;
}

// UpdateConfigInMissiveRequest sends a the information received from the
// server configuration file that missive needs.
message UpdateConfigInMissiveRequest {
  // Repeated field for the blocked destinations gotten from the configuration
  // file fetched from the server.
  optional ListOfBlockedDestinations list_of_blocked_destinations = 1;
}

message UpdateConfigInMissiveResponse {
  // Indicates success or failure of UpdateEncryptionKeyRequest.
  // Specific error codes indicate if a retry is appropriate.
  // Expected errors:
  //   FAILED_PRECONDITION:
  //     "The daemon has insufficient permissions to read/write from/to disk"
  //     - Not Retryable
  //   FAILED_PRECONDITION:
  //     "Policy controlling daemon is either unset or off."
  //     - Not Retryable
  //   UNAVAILABLE:
  //     "The daemon is still starting."
  //     - Retryable
  optional StatusProto status = 1;
}