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" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 } | 256 } |
257 | 257 |
258 void PrefServiceSyncable::UpdateCommandLinePrefStore( | 258 void PrefServiceSyncable::UpdateCommandLinePrefStore( |
259 PrefStore* cmd_line_store) { | 259 PrefStore* cmd_line_store) { |
260 // If |pref_service_forked_| is true, then this PrefService and the forked | 260 // If |pref_service_forked_| is true, then this PrefService and the forked |
261 // copies will be out of sync. | 261 // copies will be out of sync. |
262 DCHECK(!pref_service_forked_); | 262 DCHECK(!pref_service_forked_); |
263 PrefService::UpdateCommandLinePrefStore(cmd_line_store); | 263 PrefService::UpdateCommandLinePrefStore(cmd_line_store); |
264 } | 264 } |
265 | 265 |
| 266 bool PrefServiceSyncable::AllowPrefRegistrarSimple() const { |
| 267 return false; |
| 268 } |
| 269 |
266 void PrefServiceSyncable::OnIsSyncingChanged() { | 270 void PrefServiceSyncable::OnIsSyncingChanged() { |
267 FOR_EACH_OBSERVER(PrefServiceObserver, observer_list_, OnIsSyncingChanged()); | 271 FOR_EACH_OBSERVER(PrefServiceObserver, observer_list_, OnIsSyncingChanged()); |
268 } | 272 } |
269 | 273 |
270 void PrefServiceSyncable::RegisterSyncablePreference( | 274 void PrefServiceSyncable::RegisterSyncablePreference( |
271 const char* path, Value* default_value, PrefSyncStatus sync_status) { | 275 const char* path, Value* default_value, PrefSyncStatus sync_status) { |
272 PrefService::RegisterPreference(path, default_value); | 276 PrefService::RegisterPreference(path, default_value); |
273 // Register with sync if necessary. | 277 // Register with sync if necessary. |
274 if (sync_status == SYNCABLE_PREF) | 278 if (sync_status == SYNCABLE_PREF) |
275 pref_sync_associator_.RegisterPref(path); | 279 pref_sync_associator_.RegisterPref(path); |
276 } | 280 } |
OLD | NEW |