// 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. #ifndef COMPONENTS_REPORTING_CLIENT_REPORT_QUEUE_CONFIGURATION_H_ #define COMPONENTS_REPORTING_CLIENT_REPORT_QUEUE_CONFIGURATION_H_ #include <memory> #include <optional> #include <string> #include <utility> #include "base/functional/callback.h" #include "components/reporting/proto/synced/record.pb.h" #include "components/reporting/proto/synced/record_constants.pb.h" #include "components/reporting/util/rate_limiter_interface.h" #include "components/reporting/util/status.h" #include "components/reporting/util/statusor.h" #include "components/reporting/util/wrapped_rate_limiter.h" namespace reporting { // |EventType| enum is used to distinguish between user and device event types, // and inherently determine the type of DM tokens (user vs device) generated. enum class EventType { … }; // ReportQueueConfiguration configures a report queue. // |dm_token| if set will be attached to all records generated with this queue. // Pass user DM tokens where applicable so the server can associate these events // with the user. |event_type| describes the event type being reported and is // indirectly used to retrieve DM tokens for downstream processing. Please use // |EventType::kUser| for events that need to be associated with the current // user. |destination| indicates what server side handler will be handling the // records that are generated by the ReportQueueImpl. |policy_check_callback_| // is a RepeatingCallback that verifies the specific report queue is allowed. class ReportQueueConfiguration { … }; } // namespace reporting #endif // COMPONENTS_REPORTING_CLIENT_REPORT_QUEUE_CONFIGURATION_H_