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

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: move to unit_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 0808c47801355689dd07459990e5f13899bb86e1..516fdddd3da6f6f893f9487852560fb47063dde5 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -19,7 +19,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_registry_syncable.h"
#include "chrome/browser/profiles/profile.h"
@@ -224,17 +223,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