// 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. #ifndef CONTENT_BROWSER_AGGREGATION_SERVICE_AGGREGATABLE_REPORT_SCHEDULER_H_ #define CONTENT_BROWSER_AGGREGATION_SERVICE_AGGREGATABLE_REPORT_SCHEDULER_H_ #include <optional> #include <set> #include <vector> #include "base/functional/callback.h" #include "base/memory/raw_ref.h" #include "base/memory/weak_ptr.h" #include "base/time/time.h" #include "content/browser/aggregation_service/aggregation_service_storage.h" #include "content/browser/aggregation_service/report_scheduler_timer.h" #include "content/common/content_export.h" namespace base { class ElapsedTimer; class Time; } // namespace base namespace content { class AggregatableReportRequest; class AggregationServiceStorageContext; // UI thread class that is responsible for interacting with the storage layer // for report requests, waiting for a report's reporting time to be reached and // then calling the appropriate callback. // // Note that report requests can have one of two states: "pending" or // "in-progress". This represents whether the request is currently being // processed (i.e. assembled and sent). To ensure that no report is 'lost', // all requests (that haven't been deleted) become pending once more on start // up. Note that all reports with future report times are pending (unless wall // clock time goes backward). class CONTENT_EXPORT AggregatableReportScheduler { … }; } // namespace content #endif // CONTENT_BROWSER_AGGREGATION_SERVICE_AGGREGATABLE_REPORT_SCHEDULER_H_