Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui.cc

Issue 12217127: Alternate NTP: Show detached bookmark bar (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add tests Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/ntp/new_tab_ui.cc
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index 21996a461e7b46b2d68629406cd327a60e29324c..7f815c9f50d7805eacac987b555e1bdf5c0f58f0 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -18,7 +18,6 @@
#include "base/strings/string_number_conversions.h"
#include "base/threading/thread.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/defaults.h"
#include "chrome/browser/extensions/app_launcher.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -223,17 +222,6 @@ void NewTabUI::StartTimingPaint(RenderViewHost* render_view_host) {
&NewTabUI::PaintTimeout);
}
-bool NewTabUI::CanShowBookmarkBar() const {
- if (web_ui()->GetWebContents()->GetURL().SchemeIs(chrome::kViewSourceScheme))
- return false;
-
- PrefService* prefs = GetProfile()->GetPrefs();
- bool disabled_by_policy =
- prefs->IsManagedPreference(prefs::kShowBookmarkBar) &&
- !prefs->GetBoolean(prefs::kShowBookmarkBar);
- return browser_defaults::bookmarks_enabled && !disabled_by_policy;
-}
-
void NewTabUI::RenderViewCreated(RenderViewHost* render_view_host) {
StartTimingPaint(render_view_host);
}

Powered by Google App Engine
This is Rietveld 408576698