pref_store_delegate.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright (c) 2018 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef SHELL_BROWSER_PREF_STORE_DELEGATE_H_
  5. #define SHELL_BROWSER_PREF_STORE_DELEGATE_H_
  6. #include <vector>
  7. #include "base/macros.h"
  8. #include "base/memory/weak_ptr.h"
  9. #include "components/prefs/persistent_pref_store.h"
  10. #include "components/prefs/pref_value_store.h"
  11. namespace electron {
  12. class AtomBrowserContext;
  13. // Retrieves handle to the in memory pref store that gets
  14. // initialized with the pref service.
  15. class PrefStoreDelegate : public PrefValueStore::Delegate {
  16. public:
  17. explicit PrefStoreDelegate(base::WeakPtr<AtomBrowserContext> browser_context);
  18. ~PrefStoreDelegate() override;
  19. void Init(PrefStore* managed_prefs,
  20. PrefStore* supervised_user_prefs,
  21. PrefStore* extension_prefs,
  22. PrefStore* command_line_prefs,
  23. PrefStore* user_prefs,
  24. PrefStore* recommended_prefs,
  25. PrefStore* default_prefs,
  26. PrefNotifier* pref_notifier) override {}
  27. void InitIncognitoUserPrefs(
  28. scoped_refptr<PersistentPrefStore> incognito_user_prefs_overlay,
  29. scoped_refptr<PersistentPrefStore> incognito_user_prefs_underlay,
  30. const std::vector<const char*>& overlay_pref_names) override {}
  31. void InitPrefRegistry(PrefRegistry* pref_registry) override {}
  32. void UpdateCommandLinePrefStore(PrefStore* command_line_prefs) override;
  33. private:
  34. base::WeakPtr<AtomBrowserContext> browser_context_;
  35. DISALLOW_COPY_AND_ASSIGN(PrefStoreDelegate);
  36. };
  37. } // namespace electron
  38. #endif // SHELL_BROWSER_PREF_STORE_DELEGATE_H_