| Index: chrome/browser/prefs/pref_service.cc
|
| diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc
|
| index 373a86f55381230ba1761978065a277cb6b56416..0dcf2980ace3b903d49069eae1a60b8f97b1e99b 100644
|
| --- a/chrome/browser/prefs/pref_service.cc
|
| +++ b/chrome/browser/prefs/pref_service.cc
|
| @@ -28,6 +28,7 @@
|
| #include "chrome/common/json_pref_store.h"
|
| #include "content/browser/browser_thread.h"
|
| #include "content/common/notification_service.h"
|
| +#include "content/common/notification_source.h"
|
| #include "grit/chromium_strings.h"
|
| #include "grit/generated_resources.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| @@ -139,6 +140,7 @@ PrefService::PrefService(PrefStore* managed_platform_prefs,
|
| DefaultPrefStore* default_store)
|
| : user_pref_store_(user_prefs),
|
| default_store_(default_store) {
|
| + user_pref_store_->SetNotificationSource(Source<PrefService>(this));
|
| pref_notifier_.reset(new PrefNotifierImpl(this));
|
| pref_value_store_.reset(
|
| new PrefValueStore(managed_platform_prefs,
|
| @@ -213,16 +215,19 @@ bool PrefService::ReloadPersistentPrefs() {
|
|
|
| bool PrefService::SavePersistentPrefs() {
|
| DCHECK(CalledOnValidThread());
|
| -
|
| return user_pref_store_->WritePrefs();
|
| }
|
|
|
| void PrefService::ScheduleSavePersistentPrefs() {
|
| DCHECK(CalledOnValidThread());
|
| -
|
| user_pref_store_->ScheduleWritePrefs();
|
| }
|
|
|
| +void PrefService::CommitPendingWrite() {
|
| + DCHECK(CalledOnValidThread());
|
| + user_pref_store_->CommitPendingWrite();
|
| +}
|
| +
|
| void PrefService::RegisterBooleanPref(const char* path,
|
| bool default_value) {
|
| RegisterPreference(path, Value::CreateBooleanValue(default_value));
|
|
|