1 // Copyright 2015 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_COMPONENT_UPDATER_TIMER_H_
6 #define COMPONENTS_COMPONENT_UPDATER_TIMER_H_
8 #include "base/functional/callback.h"
9 #include "base/sequence_checker.h"
10 #include "base/time/time.h"
11 #include "base/timer/timer.h"
13 namespace component_updater {
19 Timer(const Timer&) = delete;
20 Timer& operator=(const Timer&) = delete;
24 void Start(base::TimeDelta initial_delay,
25 base::TimeDelta delay,
26 const base::RepeatingClosure& user_task);
33 SEQUENCE_CHECKER(sequence_checker_);
35 base::OneShotTimer timer_;
37 base::TimeDelta delay_;
38 base::RepeatingClosure user_task_;
41 } // namespace component_updater
43 #endif // COMPONENTS_COMPONENT_UPDATER_TIMER_H_