summaryrefslogtreecommitdiffstats
path: root/chrome/browser/pref_member.cc
diff options
context:
space:
mode:
authormnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-27 08:21:54 +0000
committermnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-27 08:21:54 +0000
commit8fe6e1ca6cfc7ba0c64481541ceb336ed148c260 (patch)
tree242c7394e1c4850d8efc15c3aaa5978fcd3c2e16 /chrome/browser/pref_member.cc
parent27528d3c34e78910d53e3281a1e0317a16b4ee98 (diff)
downloadchromium_src-8fe6e1ca6cfc7ba0c64481541ceb336ed148c260.zip
chromium_src-8fe6e1ca6cfc7ba0c64481541ceb336ed148c260.tar.gz
chromium_src-8fe6e1ca6cfc7ba0c64481541ceb336ed148c260.tar.bz2
Update UI, sync and importer to properly handle managed homepage prefs
The change in Preferences.xib binds the homepage options container's enabled state to the new property PreferencesWindowController.IsHomepageManaged BUG=43423 TEST=Manual, especially homepage options on general page of options dialog Review URL: http://codereview.chromium.org/2059001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48371 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/pref_member.cc')
-rw-r--r--chrome/browser/pref_member.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/pref_member.cc b/chrome/browser/pref_member.cc
index 52d887a..dd5cc30 100644
--- a/chrome/browser/pref_member.cc
+++ b/chrome/browser/pref_member.cc
@@ -37,6 +37,13 @@ void PrefMemberBase::Init(const wchar_t* pref_name, PrefService* prefs,
prefs_->AddPrefObserver(pref_name, this);
}
+bool PrefMemberBase::IsManaged() {
+ DCHECK(!pref_name_.empty());
+ const PrefService::Preference* pref =
+ prefs_->FindPreference(pref_name_.c_str());
+ return pref && pref->IsManaged();
+}
+
void PrefMemberBase::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {