2018-10-04 18:08:56 +00:00
|
|
|
// Copyright (c) 2018 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2019-06-19 20:56:58 +00:00
|
|
|
#ifndef SHELL_BROWSER_PREF_STORE_DELEGATE_H_
|
|
|
|
#define SHELL_BROWSER_PREF_STORE_DELEGATE_H_
|
2018-10-04 18:08:56 +00:00
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "base/macros.h"
|
|
|
|
#include "base/memory/weak_ptr.h"
|
|
|
|
#include "components/prefs/pref_value_store.h"
|
|
|
|
|
2021-07-02 00:51:37 +00:00
|
|
|
class PersistentPrefStore;
|
|
|
|
class PrefNotifier;
|
|
|
|
class PrefRegistry;
|
|
|
|
class PrefStore;
|
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
namespace electron {
|
2018-10-04 18:08:56 +00:00
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
class ElectronBrowserContext;
|
2018-10-04 18:08:56 +00:00
|
|
|
|
|
|
|
// Retrieves handle to the in memory pref store that gets
|
|
|
|
// initialized with the pref service.
|
|
|
|
class PrefStoreDelegate : public PrefValueStore::Delegate {
|
|
|
|
public:
|
2020-02-04 20:19:40 +00:00
|
|
|
explicit PrefStoreDelegate(
|
|
|
|
base::WeakPtr<ElectronBrowserContext> browser_context);
|
2018-10-04 18:08:56 +00:00
|
|
|
~PrefStoreDelegate() override;
|
|
|
|
|
|
|
|
void Init(PrefStore* managed_prefs,
|
|
|
|
PrefStore* supervised_user_prefs,
|
|
|
|
PrefStore* extension_prefs,
|
|
|
|
PrefStore* command_line_prefs,
|
|
|
|
PrefStore* user_prefs,
|
|
|
|
PrefStore* recommended_prefs,
|
|
|
|
PrefStore* default_prefs,
|
|
|
|
PrefNotifier* pref_notifier) override {}
|
|
|
|
|
|
|
|
void InitIncognitoUserPrefs(
|
|
|
|
scoped_refptr<PersistentPrefStore> incognito_user_prefs_overlay,
|
|
|
|
scoped_refptr<PersistentPrefStore> incognito_user_prefs_underlay,
|
|
|
|
const std::vector<const char*>& overlay_pref_names) override {}
|
|
|
|
|
|
|
|
void InitPrefRegistry(PrefRegistry* pref_registry) override {}
|
|
|
|
|
|
|
|
void UpdateCommandLinePrefStore(PrefStore* command_line_prefs) override;
|
|
|
|
|
|
|
|
private:
|
2020-02-04 20:19:40 +00:00
|
|
|
base::WeakPtr<ElectronBrowserContext> browser_context_;
|
2018-10-04 18:08:56 +00:00
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(PrefStoreDelegate);
|
|
|
|
};
|
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
} // namespace electron
|
2018-10-04 18:08:56 +00:00
|
|
|
|
2019-06-19 20:56:58 +00:00
|
|
|
#endif // SHELL_BROWSER_PREF_STORE_DELEGATE_H_
|