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/file_path.h" | 8 #include "base/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" |
| 11 #include "base/prefs/pref_notifier_impl.h" |
| 12 #include "base/prefs/pref_registry.h" |
| 13 #include "base/prefs/pref_value_store.h" |
11 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
12 #include "base/value_conversions.h" | 15 #include "base/value_conversions.h" |
13 #include "chrome/browser/prefs/pref_model_associator.h" | 16 #include "chrome/browser/prefs/pref_model_associator.h" |
14 #include "chrome/browser/prefs/pref_notifier_impl.h" | |
15 #include "chrome/browser/prefs/pref_registry.h" | |
16 #include "chrome/browser/prefs/pref_registry_syncable.h" | 17 #include "chrome/browser/prefs/pref_registry_syncable.h" |
17 #include "chrome/browser/prefs/pref_service_syncable_observer.h" | 18 #include "chrome/browser/prefs/pref_service_syncable_observer.h" |
18 #include "chrome/browser/prefs/pref_value_store.h" | |
19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" | 20 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" |
21 | 21 |
22 // static | 22 // static |
23 PrefServiceSyncable* PrefServiceSyncable::FromProfile(Profile* profile) { | 23 PrefServiceSyncable* PrefServiceSyncable::FromProfile(Profile* profile) { |
24 return static_cast<PrefServiceSyncable*>(profile->GetPrefs()); | 24 return static_cast<PrefServiceSyncable*>(profile->GetPrefs()); |
25 } | 25 } |
26 | 26 |
27 // static | 27 // static |
28 PrefServiceSyncable* PrefServiceSyncable::IncognitoFromProfile( | 28 PrefServiceSyncable* PrefServiceSyncable::IncognitoFromProfile( |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 PrefService::RemoveRegisteredPreference(path); | 136 PrefService::RemoveRegisteredPreference(path); |
137 | 137 |
138 if (pref_sync_associator_.IsPrefRegistered(path)) | 138 if (pref_sync_associator_.IsPrefRegistered(path)) |
139 pref_sync_associator_.UnregisterPref(path); | 139 pref_sync_associator_.UnregisterPref(path); |
140 } | 140 } |
141 | 141 |
142 void PrefServiceSyncable::OnIsSyncingChanged() { | 142 void PrefServiceSyncable::OnIsSyncingChanged() { |
143 FOR_EACH_OBSERVER(PrefServiceSyncableObserver, observer_list_, | 143 FOR_EACH_OBSERVER(PrefServiceSyncableObserver, observer_list_, |
144 OnIsSyncingChanged()); | 144 OnIsSyncingChanged()); |
145 } | 145 } |
OLD | NEW |