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

Side by Side Diff: chrome/browser/prefs/chrome_pref_service_factory.cc

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add to PrefRegistrySyncable and PrefServiceSyncable to let sync know of pre-registered prefs. Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/prefs/chrome_pref_service_factory.h" 5 #include "chrome/browser/prefs/chrome_pref_service_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "base/prefs/default_pref_store.h" 11 #include "base/prefs/default_pref_store.h"
12 #include "base/prefs/json_pref_store.h" 12 #include "base/prefs/json_pref_store.h"
13 #include "chrome/browser/policy/configuration_policy_pref_store.h" 13 #include "chrome/browser/policy/configuration_policy_pref_store.h"
14 #include "chrome/browser/prefs/command_line_pref_store.h" 14 #include "chrome/browser/prefs/command_line_pref_store.h"
15 #include "chrome/browser/prefs/pref_model_associator.h" 15 #include "chrome/browser/prefs/pref_model_associator.h"
16 #include "chrome/browser/prefs/pref_notifier_impl.h" 16 #include "chrome/browser/prefs/pref_notifier_impl.h"
17 #include "chrome/browser/prefs/pref_registry.h" 17 #include "chrome/browser/prefs/pref_registry.h"
18 #include "chrome/browser/prefs/pref_registry_syncable.h"
18 #include "chrome/browser/prefs/pref_service.h" 19 #include "chrome/browser/prefs/pref_service.h"
19 #include "chrome/browser/prefs/pref_service_syncable_builder.h" 20 #include "chrome/browser/prefs/pref_service_syncable_builder.h"
20 #include "chrome/browser/prefs/pref_value_store.h" 21 #include "chrome/browser/prefs/pref_value_store.h"
21 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/ui/profile_error_dialog.h" 23 #include "chrome/browser/ui/profile_error_dialog.h"
23 #include "content/public/browser/browser_context.h" 24 #include "content/public/browser/browser_context.h"
24 #include "content/public/browser/browser_thread.h" 25 #include "content/public/browser/browser_thread.h"
25 #include "grit/chromium_strings.h" 26 #include "grit/chromium_strings.h"
26 #include "grit/generated_resources.h" 27 #include "grit/generated_resources.h"
27 28
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 extension_prefs, 115 extension_prefs,
115 async); 116 async);
116 return builder.Create(pref_registry); 117 return builder.Create(pref_registry);
117 } 118 }
118 119
119 PrefServiceSyncable* CreateProfilePrefs( 120 PrefServiceSyncable* CreateProfilePrefs(
120 const FilePath& pref_filename, 121 const FilePath& pref_filename,
121 base::SequencedTaskRunner* pref_io_task_runner, 122 base::SequencedTaskRunner* pref_io_task_runner,
122 policy::PolicyService* policy_service, 123 policy::PolicyService* policy_service,
123 const scoped_refptr<PrefStore>& extension_prefs, 124 const scoped_refptr<PrefStore>& extension_prefs,
125 const scoped_refptr<PrefRegistrySyncable>& pref_registry,
124 bool async) { 126 bool async) {
125 PrefServiceSyncableBuilder builder; 127 PrefServiceSyncableBuilder builder;
126 PrepareBuilder(&builder, 128 PrepareBuilder(&builder,
127 pref_filename, 129 pref_filename,
128 pref_io_task_runner, 130 pref_io_task_runner,
129 policy_service, 131 policy_service,
130 extension_prefs, 132 extension_prefs,
131 async); 133 async);
132 return builder.CreateSyncable(); 134 return builder.CreateSyncable(pref_registry);
133 } 135 }
134 136
135 } // namespace chrome_prefs 137 } // namespace chrome_prefs
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698