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

Unified Diff: chrome/browser/prefs/chrome_pref_service_builder.h

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: WIP, latest changes from kaiwang@ Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prefs/chrome_pref_service_builder.h
diff --git a/chrome/browser/prefs/chrome_pref_service_builder.h b/chrome/browser/prefs/chrome_pref_service_builder.h
index 64f42256c15829a0c9853b5b97d2daf837559d21..8051b0a8a1d191c5b7d2844529dc81a2b8fce52c 100644
--- a/chrome/browser/prefs/chrome_pref_service_builder.h
+++ b/chrome/browser/prefs/chrome_pref_service_builder.h
@@ -18,10 +18,10 @@ class ChromePrefServiceBuilder : public PrefServiceBuilder {
ChromePrefServiceBuilder();
virtual ~ChromePrefServiceBuilder();
- // Factory method that creates a new instance of a PrefService for
- // Chrome with the applicable PrefStores. The |pref_filename| points
- // to the user preference file. This is the usual way to create a
- // new PrefService.
+ // Factory methods that create and initialize a new instance of a
+ // PrefService for Chrome with the applicable PrefStores. The
+ // |pref_filename| points to the user preference file. This is the
+ // usual way to create a new PrefService.
// |extension_pref_store| is used as the source for extension-controlled
// preferences and may be NULL.
// |policy_service| is used as the source for mandatory or recommended
@@ -32,7 +32,15 @@ class ChromePrefServiceBuilder : public PrefServiceBuilder {
// the created PrefService or NULL if creation has failed. Note, it is
// guaranteed that in asynchronous version initialization happens after this
// function returned.
- PrefService* CreateChromePrefs(
+
+ PrefServiceSimple* CreateLocalState(
+ const FilePath& pref_filename,
+ base::SequencedTaskRunner* pref_io_task_runner,
+ policy::PolicyService* policy_service,
+ PrefStore* extension_prefs,
+ bool async);
+
+ PrefServiceSyncable* CreateProfilePrefs(
const FilePath& pref_filename,
base::SequencedTaskRunner* pref_io_task_runner,
policy::PolicyService* policy_service,
@@ -40,6 +48,13 @@ class ChromePrefServiceBuilder : public PrefServiceBuilder {
bool async);
private:
+ void BuildImpl(
+ const FilePath& pref_filename,
+ base::SequencedTaskRunner* pref_io_task_runner,
+ policy::PolicyService* policy_service,
+ PrefStore* extension_prefs,
+ bool async);
+
void ResetDefaultState();
DISALLOW_COPY_AND_ASSIGN(ChromePrefServiceBuilder);

Powered by Google App Engine
This is Rietveld 408576698