Kaido Kert | 25902c6 | 2024-06-17 17:10:28 -0700 | [diff] [blame^] | 1 | // Copyright 2017 The Chromium Authors |
Andrew Top | 0d1858f | 2019-05-15 22:01:47 -0700 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // Based on net::ReportingPolicy class declaration. |
| 6 | |
| 7 | syntax = "proto2"; |
| 8 | |
Kaido Kert | 25902c6 | 2024-06-17 17:10:28 -0700 | [diff] [blame^] | 9 | import "testing/libfuzzer/proto/json.proto"; |
Andrew Top | 0d1858f | 2019-05-15 22:01:47 -0700 | [diff] [blame] | 10 | |
| 11 | package net_reporting_policy_proto; |
| 12 | |
Kaido Kert | 25902c6 | 2024-06-17 17:10:28 -0700 | [diff] [blame^] | 13 | // TODO(chlily): Can we get rid of this proto? ReportingHeaderParser doesn't |
| 14 | // really consider any of the ReportingPolicy fields except maybe |
| 15 | // max_endpoint_count. |
Andrew Top | 0d1858f | 2019-05-15 22:01:47 -0700 | [diff] [blame] | 16 | message ReportingPolicy { |
| 17 | // TODO: consider implementing proto for endpoint_backoff_policy. |
| 18 | required uint64 max_report_count = 1; |
Kaido Kert | 25902c6 | 2024-06-17 17:10:28 -0700 | [diff] [blame^] | 19 | required uint64 max_endpoint_count = 2; |
Andrew Top | 0d1858f | 2019-05-15 22:01:47 -0700 | [diff] [blame] | 20 | required uint64 delivery_interval_us = 3; |
| 21 | required uint64 persistence_interval_us = 4; |
| 22 | required bool persist_reports_across_restarts = 5; |
| 23 | required bool persist_clients_across_restarts = 6; |
| 24 | required uint64 garbage_collection_interval_us = 7; |
| 25 | required uint64 max_report_age_us = 8; |
| 26 | required int32 max_report_attempts = 9; |
| 27 | required bool persist_reports_across_network_changes = 10; |
| 28 | required bool persist_clients_across_network_changes = 11; |
Kaido Kert | 25902c6 | 2024-06-17 17:10:28 -0700 | [diff] [blame^] | 29 | optional uint64 max_endpoints_per_origin = 12 [default = 40]; |
| 30 | optional uint64 max_group_staleness_us = 13 [default = 604800000000]; |
Andrew Top | 0d1858f | 2019-05-15 22:01:47 -0700 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | message ReportingHeaderParserFuzzInput { |
| 34 | required ReportingPolicy policy = 1; |
| 35 | required json_proto.JsonObject headers = 2; |
| 36 | } |