#include "components/reporting/client/report_queue_configuration.h"
#include <string>
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/types/expected.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/status_macros.h"
#include "components/reporting/util/statusor.h"
#include "components/reporting/util/wrapped_rate_limiter.h"
namespace reporting {
ReportQueueConfiguration::Builder::Builder(
const ReportQueueConfiguration::Settings& settings)
: … { … }
ReportQueueConfiguration::Builder::Builder(
ReportQueueConfiguration::Builder&& other) = default;
ReportQueueConfiguration::Builder::~Builder() = default;
ReportQueueConfiguration::Builder
ReportQueueConfiguration::Builder::SetPolicyCheckCallback(
ReportQueueConfiguration::PolicyCheckCallback policy_check_callback) { … }
ReportQueueConfiguration::Builder
ReportQueueConfiguration::Builder::SetRateLimiter(
std::unique_ptr<RateLimiterInterface> rate_limiter) { … }
ReportQueueConfiguration::Builder ReportQueueConfiguration::Builder::SetDMToken(
std::string_view dm_token) { … }
ReportQueueConfiguration::Builder
ReportQueueConfiguration::Builder::SetSourceInfo(
std::optional<SourceInfo> source_info) { … }
StatusOr<std::unique_ptr<ReportQueueConfiguration>>
ReportQueueConfiguration::Builder::Build() { … }
ReportQueueConfiguration::ReportQueueConfiguration() = default;
ReportQueueConfiguration::~ReportQueueConfiguration() = default;
ReportQueueConfiguration::Builder ReportQueueConfiguration::Create(
const ReportQueueConfiguration::Settings& settings) { … }
StatusOr<std::unique_ptr<ReportQueueConfiguration>>
ReportQueueConfiguration::Create(
std::string_view dm_token,
Destination destination,
PolicyCheckCallback policy_check_callback,
std::unique_ptr<RateLimiterInterface> rate_limiter,
int64_t reserved_space) { … }
Status ReportQueueConfiguration::SetPolicyCheckCallback(
PolicyCheckCallback policy_check_callback) { … }
Status ReportQueueConfiguration::SetEventType(EventType event_type) { … }
Status ReportQueueConfiguration::CheckPolicy() const { … }
Status ReportQueueConfiguration::SetDMToken(std::string_view dm_token) { … }
Status ReportQueueConfiguration::SetDestination(Destination destination) { … }
Status ReportQueueConfiguration::SetRateLimiter(
std::unique_ptr<RateLimiterInterface> rate_limiter) { … }
Status ReportQueueConfiguration::SetReservedSpace(int64_t reserved_space) { … }
Status ReportQueueConfiguration::SetSourceInfo(
std::optional<SourceInfo> source_info) { … }
}