Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Side by Side Diff: components/update_client/action_wait.h

Issue 2835803002: Refactor the UpdateEngine and its actions in the component updater. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef COMPONENTS_UPDATE_CLIENT_ACTION_WAIT_H_
6 #define COMPONENTS_UPDATE_CLIENT_ACTION_WAIT_H_
7
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "base/time/time.h"
11
12 #include "components/update_client/action.h"
13
14 namespace update_client {
15
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 {
20 public:
21 explicit ActionWait(const base::TimeDelta& time_delta);
22 ~ActionWait() override;
23
24 void Run(UpdateContext* update_context, Callback callback) override;
25
26 private:
27 void WaitComplete();
28
29 const base::TimeDelta time_delta_;
30
31 DISALLOW_COPY_AND_ASSIGN(ActionWait);
32 };
33
34 } // namespace update_client
35
36 #endif // COMPONENTS_UPDATE_CLIENT_ACTION_WAIT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698