// Copyright 2017 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_POLICY_CORE_COMMON_POLICY_SCHEDULER_H_ #define COMPONENTS_POLICY_CORE_COMMON_POLICY_SCHEDULER_H_ #include <memory> #include "base/cancelable_callback.h" #include "base/functional/callback.h" #include "base/memory/weak_ptr.h" #include "base/sequence_checker.h" #include "base/time/time.h" #include "components/policy/policy_export.h" namespace policy { // Scheduler for driving repeated asynchronous tasks such as e.g. policy // fetches. Subsequent tasks are guaranteed not to overlap. Tasks are posted to // the current thread and therefore must not block (suitable e.g. for // asynchronous D-Bus calls). // Tasks scheduling begins immediately after instantiation of the class. Upon // destruction, scheduled but not yet started tasks are cancelled. The result of // started but not finished tasks is NOT reported. class POLICY_EXPORT PolicyScheduler { … }; } // namespace policy #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_SCHEDULER_H_