| 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
|
|
|