Introduce per-tab preferences service.
This enables overriding user preferences on a per-tab rather
than per-profile basis.
Based on this CL: http://codereview.chromium.org/7838030/
BUG=none
TEST=unit_tests pass
Review URL: http://codereview.chromium.org/8568019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111128 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/prefs/pref_notifier_impl.cc b/chrome/browser/prefs/pref_notifier_impl.cc
index ec5352b..3c23879 100644
--- a/chrome/browser/prefs/pref_notifier_impl.cc
+++ b/chrome/browser/prefs/pref_notifier_impl.cc
@@ -10,6 +10,10 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_service.h"
+PrefNotifierImpl::PrefNotifierImpl()
+ : pref_service_(NULL) {
+}
+
PrefNotifierImpl::PrefNotifierImpl(PrefService* service)
: pref_service_(service) {
}
@@ -104,3 +108,8 @@
content::Details<const std::string>(&path));
}
}
+
+void PrefNotifierImpl::SetPrefService(PrefService* pref_service) {
+ DCHECK(pref_service_ == NULL);
+ pref_service_ = pref_service;
+}