| 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.h" | 5 #include "chrome/browser/prefs/pref_service_syncable.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/prefs/default_pref_store.h" | 9 #include "base/prefs/default_pref_store.h" |
| 10 #include "base/prefs/overlay_user_pref_store.h" | 10 #include "base/prefs/overlay_user_pref_store.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 OverlayUserPrefStore* incognito_pref_store = | 85 OverlayUserPrefStore* incognito_pref_store = |
| 86 new OverlayUserPrefStore(user_pref_store_.get()); | 86 new OverlayUserPrefStore(user_pref_store_.get()); |
| 87 PrefsTabHelper::InitIncognitoUserPrefStore(incognito_pref_store); | 87 PrefsTabHelper::InitIncognitoUserPrefStore(incognito_pref_store); |
| 88 | 88 |
| 89 scoped_refptr<user_prefs::PrefRegistrySyncable> forked_registry = | 89 scoped_refptr<user_prefs::PrefRegistrySyncable> forked_registry = |
| 90 static_cast<user_prefs::PrefRegistrySyncable*>( | 90 static_cast<user_prefs::PrefRegistrySyncable*>( |
| 91 pref_registry_.get())->ForkForIncognito(); | 91 pref_registry_.get())->ForkForIncognito(); |
| 92 PrefServiceSyncable* incognito_service = new PrefServiceSyncable( | 92 PrefServiceSyncable* incognito_service = new PrefServiceSyncable( |
| 93 pref_notifier, | 93 pref_notifier, |
| 94 pref_value_store_->CloneAndSpecialize(NULL, // managed | 94 pref_value_store_->CloneAndSpecialize(NULL, // managed |
| 95 NULL, // managed_user | 95 NULL, // supervised_user |
| 96 incognito_extension_prefs, | 96 incognito_extension_prefs, |
| 97 NULL, // command_line_prefs | 97 NULL, // command_line_prefs |
| 98 incognito_pref_store, | 98 incognito_pref_store, |
| 99 NULL, // recommended | 99 NULL, // recommended |
| 100 forked_registry->defaults().get(), | 100 forked_registry->defaults().get(), |
| 101 pref_notifier), | 101 pref_notifier), |
| 102 incognito_pref_store, | 102 incognito_pref_store, |
| 103 forked_registry.get(), | 103 forked_registry.get(), |
| 104 read_error_callback_, | 104 read_error_callback_, |
| 105 false); | 105 false); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 void PrefServiceSyncable::OnIsSyncingChanged() { | 179 void PrefServiceSyncable::OnIsSyncingChanged() { |
| 180 FOR_EACH_OBSERVER(PrefServiceSyncableObserver, observer_list_, | 180 FOR_EACH_OBSERVER(PrefServiceSyncableObserver, observer_list_, |
| 181 OnIsSyncingChanged()); | 181 OnIsSyncingChanged()); |
| 182 } | 182 } |
| 183 | 183 |
| 184 void PrefServiceSyncable::ProcessPrefChange(const std::string& name) { | 184 void PrefServiceSyncable::ProcessPrefChange(const std::string& name) { |
| 185 pref_sync_associator_.ProcessPrefChange(name); | 185 pref_sync_associator_.ProcessPrefChange(name); |
| 186 priority_pref_sync_associator_.ProcessPrefChange(name); | 186 priority_pref_sync_associator_.ProcessPrefChange(name); |
| 187 } | 187 } |
| OLD | NEW |