1 // Copyright 2015 The Chromium Authors. All rights reserved.
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_UPDATE_CLIENT_ACTION_WAIT_H_
6 #define COMPONENTS_UPDATE_CLIENT_ACTION_WAIT_H_
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "base/time/time.h"
12 #include "components/update_client/action.h"
14 namespace update_client
{
16 // Implements a wait between handling updates for the CRXs in this context.
17 // To avoid thrashing of local computing resources, updates are applied one
18 // at a time, with a delay between them.
19 class ActionWait
: public Action
, protected ActionImpl
{
21 explicit ActionWait(const base::TimeDelta
& time_delta
);
22 ~ActionWait() override
;
24 void Run(UpdateContext
* update_context
, Callback callback
) override
;
29 const base::TimeDelta time_delta_
;
31 DISALLOW_COPY_AND_ASSIGN(ActionWait
);
34 } // namespace update_client
36 #endif // COMPONENTS_UPDATE_CLIENT_ACTION_WAIT_H_