Implemented policy for disabling the bookmark bar.

BUG=49604
TEST=unit_tests ConfigurationPolicy*

Review URL: http://codereview.chromium.org/6718039

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81102 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index a15e6fe9..26aa66a9 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -972,6 +972,9 @@
   if (!browser_defaults::bookmarks_enabled)
     return false;
 
+  if (!profile()->GetPrefs()->GetBoolean(prefs::kEnableBookmarkBar))
+    return false;
+
   // See GetWebUIForCurrentState() comment for more info. This case is very
   // similar, but for non-first loads, we want to use the committed entry. This
   // is so the bookmarks bar disappears at the same time the page does.