summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/gtk
diff options
context:
space:
mode:
authorjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-05 13:32:19 +0000
committerjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-05 13:32:19 +0000
commita007e737fd2fd716291a43c9ae24335769994692 (patch)
treef7def255a42534b36d5afb857a5eec11702ac3e7 /chrome/browser/ui/gtk
parentcd9adcb8fd0c85a18fa78ce4cda3a7981d9aae07 (diff)
downloadchromium_src-a007e737fd2fd716291a43c9ae24335769994692.zip
chromium_src-a007e737fd2fd716291a43c9ae24335769994692.tar.gz
chromium_src-a007e737fd2fd716291a43c9ae24335769994692.tar.bz2
Prevent accelerators from toggling the bookmark bar when disabled by policy.
BookmarkBarEnabled policy also sets the kShowBookmarkBar pref, so that the pref is disabled in the preferences UI. BUG=90731 TEST=Set the BookmarkBarEnabled policy. When true, the bookmark bar is always shown on the NTP. When false, it is never shown anywhere. In either case, it can't be modified by the user. Review URL: http://codereview.chromium.org/7564011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95608 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/gtk')
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index e568191..6320fcb 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -912,12 +912,9 @@ void BrowserWindowGtk::RotatePaneFocus(bool forwards) {
}
bool BrowserWindowGtk::IsBookmarkBarVisible() const {
- return (browser_->SupportsWindowFeature(Browser::FEATURE_BOOKMARKBAR) &&
- bookmark_bar_.get() &&
- browser_->profile()->GetPrefs()->GetBoolean(
- prefs::kShowBookmarkBar) &&
- browser_->profile()->GetPrefs()->GetBoolean(
- prefs::kEnableBookmarkBar));
+ return browser_->SupportsWindowFeature(Browser::FEATURE_BOOKMARKBAR) &&
+ bookmark_bar_.get() &&
+ browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar);
}
bool BrowserWindowGtk::IsBookmarkBarAnimating() const {