OLD | NEW |
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/pref_service_syncable_builder.h" | 5 #include "chrome/browser/prefs/pref_service_syncable_builder.h" |
6 | 6 |
7 #include "base/prefs/default_pref_store.h" | 7 #include "base/prefs/default_pref_store.h" |
8 #include "base/prefs/pref_notifier_impl.h" | 8 #include "base/prefs/pref_notifier_impl.h" |
9 #include "base/prefs/pref_value_store.h" | 9 #include "base/prefs/pref_value_store.h" |
10 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 10 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 } | 35 } |
36 #endif | 36 #endif |
37 | 37 |
38 PrefServiceSyncableBuilder& | 38 PrefServiceSyncableBuilder& |
39 PrefServiceSyncableBuilder::WithCommandLine(CommandLine* command_line) { | 39 PrefServiceSyncableBuilder::WithCommandLine(CommandLine* command_line) { |
40 WithCommandLinePrefs(new CommandLinePrefStore(command_line)); | 40 WithCommandLinePrefs(new CommandLinePrefStore(command_line)); |
41 return *this; | 41 return *this; |
42 } | 42 } |
43 | 43 |
44 PrefServiceSyncable* PrefServiceSyncableBuilder::CreateSyncable( | 44 PrefServiceSyncable* PrefServiceSyncableBuilder::CreateSyncable( |
45 PrefRegistrySyncable* pref_registry) { | 45 user_prefs::PrefRegistrySyncable* pref_registry) { |
46 PrefNotifierImpl* pref_notifier = new PrefNotifierImpl(); | 46 PrefNotifierImpl* pref_notifier = new PrefNotifierImpl(); |
47 PrefServiceSyncable* pref_service = new PrefServiceSyncable( | 47 PrefServiceSyncable* pref_service = new PrefServiceSyncable( |
48 pref_notifier, | 48 pref_notifier, |
49 new PrefValueStore( | 49 new PrefValueStore( |
50 managed_prefs_.get(), | 50 managed_prefs_.get(), |
51 extension_prefs_.get(), | 51 extension_prefs_.get(), |
52 command_line_prefs_.get(), | 52 command_line_prefs_.get(), |
53 user_prefs_.get(), | 53 user_prefs_.get(), |
54 recommended_prefs_.get(), | 54 recommended_prefs_.get(), |
55 pref_registry->defaults(), | 55 pref_registry->defaults(), |
56 pref_notifier), | 56 pref_notifier), |
57 user_prefs_.get(), | 57 user_prefs_.get(), |
58 pref_registry, | 58 pref_registry, |
59 read_error_callback_, | 59 read_error_callback_, |
60 async_); | 60 async_); |
61 ResetDefaultState(); | 61 ResetDefaultState(); |
62 return pref_service; | 62 return pref_service; |
63 } | 63 } |
OLD | NEW |