1 // Copyright 2014 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 // Helper to initialize PrefService for cast shell.
7 #ifndef CHROMECAST_BROWSER_PREF_SERVICE_HELPER_H_
8 #define CHROMECAST_BROWSER_PREF_SERVICE_HELPER_H_
12 #include "base/files/file_path.h"
13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/prefs/pref_service.h"
16 #include "base/threading/sequenced_worker_pool.h"
17 #include "base/threading/thread_checker.h"
19 class PrefRegistrySimple
;
21 namespace chromecast
{
24 // It uses JsonPrefStore internally and/so the format of config file is same to
25 // that of JsonPrefStore.
26 class PrefServiceHelper
{
28 // Loads configs from config file. Returns true if successful.
29 static scoped_ptr
<PrefService
> CreatePrefService(
30 PrefRegistrySimple
* registry
);
33 // Registers any needed preferences for the current platform.
34 static void RegisterPlatformPrefs(PrefRegistrySimple
* registry
);
36 // Called after the pref file has been loaded.
37 static void OnPrefsLoaded(PrefService
* pref_service
);
41 } // namespace chromecast
43 #endif // CHROMECAST_BROWSER_PREF_SERVICE_HELPER_H_