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

Side by Side Diff: chromecast/browser/pref_service_helper.h

Issue 1662843002: Revert of Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Helper to initialize PrefService for cast shell. 5 // Helper to initialize PrefService for cast shell.
6 6
7 #ifndef CHROMECAST_BROWSER_PREF_SERVICE_HELPER_H_ 7 #ifndef CHROMECAST_BROWSER_PREF_SERVICE_HELPER_H_
8 #define CHROMECAST_BROWSER_PREF_SERVICE_HELPER_H_ 8 #define CHROMECAST_BROWSER_PREF_SERVICE_HELPER_H_
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/prefs/pref_service.h"
15 #include "base/threading/sequenced_worker_pool.h" 16 #include "base/threading/sequenced_worker_pool.h"
16 #include "base/threading/thread_checker.h" 17 #include "base/threading/thread_checker.h"
17 #include "components/prefs/pref_service.h"
18 18
19 class PrefRegistrySimple; 19 class PrefRegistrySimple;
20 20
21 namespace chromecast { 21 namespace chromecast {
22 namespace shell { 22 namespace shell {
23 23
24 // It uses JsonPrefStore internally and/so the format of config file is same to 24 // It uses JsonPrefStore internally and/so the format of config file is same to
25 // that of JsonPrefStore. 25 // that of JsonPrefStore.
26 class PrefServiceHelper { 26 class PrefServiceHelper {
27 public: 27 public:
28 // Loads configs from config file. Returns true if successful. 28 // Loads configs from config file. Returns true if successful.
29 static scoped_ptr<PrefService> CreatePrefService( 29 static scoped_ptr<PrefService> CreatePrefService(
30 PrefRegistrySimple* registry); 30 PrefRegistrySimple* registry);
31 31
32 private: 32 private:
33 // Registers any needed preferences for the current platform. 33 // Registers any needed preferences for the current platform.
34 static void RegisterPlatformPrefs(PrefRegistrySimple* registry); 34 static void RegisterPlatformPrefs(PrefRegistrySimple* registry);
35 35
36 // Called after the pref file has been loaded. 36 // Called after the pref file has been loaded.
37 static void OnPrefsLoaded(PrefService* pref_service); 37 static void OnPrefsLoaded(PrefService* pref_service);
38 }; 38 };
39 39
40 } // namespace shell 40 } // namespace shell
41 } // namespace chromecast 41 } // namespace chromecast
42 42
43 #endif // CHROMECAST_BROWSER_PREF_SERVICE_HELPER_H_ 43 #endif // CHROMECAST_BROWSER_PREF_SERVICE_HELPER_H_
OLDNEW
« no previous file with comments | « chromecast/browser/metrics/cast_stability_metrics_provider.cc ('k') | chromecast/browser/pref_service_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698