// Copyright 2023 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_UTIL_RATE_LIMITER_SLIDE_WINDOW_H_ #define COMPONENTS_REPORTING_UTIL_RATE_LIMITER_SLIDE_WINDOW_H_ #include <cstddef> #include <queue> #include "base/functional/bind.h" #include "base/memory/weak_ptr.h" #include "base/sequence_checker.h" #include "base/task/sequenced_task_runner.h" #include "base/time/time.h" #include "components/reporting/util/rate_limiter_interface.h" namespace reporting { // Rate limiter implementation of the bucket slide window algorithm. // It limits the total size of the events by `total_size` and tracks them // using `bucket_count` buckets comprising `time_window` (thus each bucket // tracks a period of `time_window / bucket_count`). class RateLimiterSlideWindow : public RateLimiterInterface { … }; } // namespace reporting #endif // COMPONENTS_REPORTING_UTIL_RATE_LIMITER_SLIDE_WINDOW_H_