ExtensionSyncService: listen for relevant changes instead of being explicitly called...
[chromium-blink-merge.git] / chrome / browser / chromeos / login / easy_unlock / bootstrap_manager.h
blob46955baf54ad8dde0ca0cb4922030df398712a21
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 CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_BOOTSTRAP_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_BOOTSTRAP_MANAGER_H_
8 #include <string>
10 #include "base/macros.h"
12 class PrefRegistrySimple;
14 namespace chromeos {
16 // BootstrapManager manages bootstrap user specific values such as tracking
17 // pending bootstrap and clearing such state.
18 class BootstrapManager {
19 public:
20 static void RegisterPrefs(PrefRegistrySimple* registry);
22 class Delegate {
23 public:
24 virtual void RemovePendingBootstrapUser(const std::string& user_id) = 0;
26 protected:
27 virtual ~Delegate() {}
30 explicit BootstrapManager(Delegate* delegate);
31 ~BootstrapManager();
33 void AddPendingBootstrap(const std::string& user_id);
34 void FinishPendingBootstrap(const std::string& user_id);
35 void RemoveAllPendingBootstrap();
37 bool HasPendingBootstrap(const std::string& user_id) const;
39 private:
40 Delegate* delegate_;
42 DISALLOW_COPY_AND_ASSIGN(BootstrapManager);
45 } // namespace chromeos
47 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_BOOTSTRAP_MANAGER_H_