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

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

Issue 7610014: [ntp4] Bookmarks page implementation, first-pass. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Final review tweaks, rebase. Created 9 years, 4 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
===================================================================
--- chrome/browser/ui/webui/ntp/new_tab_ui.cc (revision 96850)
+++ chrome/browser/ui/webui/ntp/new_tab_ui.cc (working copy)
@@ -189,7 +189,7 @@
// Override some options on the Web UI.
hide_favicon_ = true;
- if (!Ntp4Enabled() &&
+ if (!NTP4Enabled() &&
GetProfile()->GetPrefs()->GetBoolean(prefs::kEnableBookmarkBar) &&
browser_defaults::bookmarks_enabled) {
set_force_bookmark_bar_visible(true);
@@ -223,7 +223,7 @@
AddMessageHandler((new AppLauncherHandler(service))->Attach(this));
AddMessageHandler((new NewTabPageHandler())->Attach(this));
- if (Ntp4Enabled()) {
+ if (NTP4Enabled()) {
AddMessageHandler((new BookmarksHandler())->Attach(this));
AddMessageHandler((new FaviconWebUIHandler())->Attach(this));
}
@@ -346,6 +346,8 @@
AppLauncherHandler::RegisterUserPrefs(prefs);
MostVisitedHandler::RegisterUserPrefs(prefs);
ShownSectionsHandler::RegisterUserPrefs(prefs);
+ if (NTP4Enabled())
+ BookmarksHandler::RegisterUserPrefs(prefs);
UpdateUserPrefsVersion(prefs);
}
@@ -419,7 +421,7 @@
}
// static
-bool NewTabUI::Ntp4Enabled() {
+bool NewTabUI::NTP4Enabled() {
#if defined(TOUCH_UI)
return CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewTabPage);
#else

Powered by Google App Engine
This is Rietveld 408576698