File: aggregatable_report.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 (78 lines) | stat: -rw-r--r-- 2,406 bytes parent folder | download | duplicates (4)
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
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Protos for persisting AggregatableReportRequests.

syntax = "proto3";

package content.proto;

option optimize_for = LITE_RUNTIME;

// Proto equivalent of `blink::mojom::AggregatableReportHistogramContribution`
message AggregatableReportHistogramContribution {
  uint64 bucket_high = 1;
  uint64 bucket_low = 2;
  int32 value = 3;
  optional uint64 filtering_id = 4;
}

// Proto equivalent of `content::AggregationServicePayloadContents`
message AggregationServicePayloadContents {
  enum Operation {
    HISTOGRAM = 0;
  }

  Operation operation = 1;
  repeated AggregatableReportHistogramContribution contributions = 2;
  int32 max_contributions_allowed = 5;
  optional string aggregation_coordinator_origin = 6;
  optional uint32 filtering_id_max_bytes = 7;

  reserved 3;
  reserved "aggregation_mode";
  reserved 4;
  reserved "aggregation_coordinator";
}

// Proto equivalent of `content::AggregatableReportSharedInfo`
message AggregatableReportSharedInfo {
  enum DebugMode {
    DISABLED = 0;
    ENABLED = 1;
  }

  // Stored as microseconds since the Windows epoch (1601-01-01 00:00:00 UTC).
  int64 scheduled_report_time = 1;
  string report_id = 2;
  string reporting_origin = 3;
  DebugMode debug_mode = 4;
  // additional_fields is assumed to be empty (for now)
  string api_version = 5;
  string api_identifier = 6;
}

// Proto equivalent of `content::AggregatableReportRequest`
message AggregatableReportRequest {
  // processing_urls is inferred to be the default value(s).
  AggregationServicePayloadContents payload_contents = 1;
  AggregatableReportSharedInfo shared_info = 2;
  string reporting_path = 3;
  optional uint64 debug_key = 4;
  int32 failed_send_attempts = 5;
  map<string, string> additional_fields = 6;

  // Rough categories of report scheduling delays used for metrics. Keep this
  // synchronized with `content::AggregatableReportRequest::DelayType`. Do not
  // remove or renumber enumerators because protos containing these values are
  // persisted to disk.
  enum DelayType {
    SCHEDULED_WITH_REDUCED_DELAY = 0;
    SCHEDULED_WITH_FULL_DELAY = 1;
    // Unscheduled requests are never scheduled, and thus never written to disk.
    reserved 2;
    reserved "UNSCHEDULED";
  }
  optional DelayType delay_type = 7;
}