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

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

Issue 10827075: Use isDiscoveryInNTPEnabled flag instead of isSuggestionsPageEnabled flag to control suggestions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.h ('k') | chrome/browser/ui/webui/ntp/ntp_resource_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1ff1a49a898467d83a6a5579ec70f2e5c60c0592..a35bfbb88057fb0fe0b0a3fb2fb0415f48c592c2 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -107,7 +107,7 @@ NewTabUI::NewTabUI(content::WebUI* web_ui)
web_ui->AddMessageHandler(new RecentlyClosedTabsHandler());
web_ui->AddMessageHandler(new MetricsHandler());
#if !defined(OS_ANDROID)
- if (NewTabUI::IsSuggestionsPageEnabled())
+ if (NewTabUI::IsDiscoveryInNTPEnabled())
web_ui->AddMessageHandler(new SuggestionsHandler());
// Android doesn't have a sync promo/username on NTP.
if (GetProfile()->IsSyncAccessible())
@@ -141,8 +141,8 @@ NewTabUI::NewTabUI(content::WebUI* web_ui)
new NewTabHTMLSource(GetProfile()->GetOriginalProfile());
// These two resources should be loaded only if suggestions NTP is enabled.
html_source->AddResource("suggestions_page.css", "text/css",
- NewTabUI::IsSuggestionsPageEnabled() ? IDR_SUGGESTIONS_PAGE_CSS : 0);
- if (NewTabUI::IsSuggestionsPageEnabled()) {
+ NewTabUI::IsDiscoveryInNTPEnabled() ? IDR_SUGGESTIONS_PAGE_CSS : 0);
+ if (NewTabUI::IsDiscoveryInNTPEnabled()) {
html_source->AddResource("suggestions_page.js", "application/javascript",
IDR_SUGGESTIONS_PAGE_JS);
}
@@ -269,7 +269,7 @@ void NewTabUI::RegisterUserPrefs(PrefService* prefs) {
NewTabPageHandler::RegisterUserPrefs(prefs);
#if !defined(OS_ANDROID)
AppLauncherHandler::RegisterUserPrefs(prefs);
- if (NewTabUI::IsSuggestionsPageEnabled())
+ if (NewTabUI::IsDiscoveryInNTPEnabled())
SuggestionsHandler::RegisterUserPrefs(prefs);
#endif
MostVisitedHandler::RegisterUserPrefs(prefs);
@@ -288,9 +288,9 @@ bool NewTabUI::ShouldShowApps() {
}
// static
-bool NewTabUI::IsSuggestionsPageEnabled() {
+bool NewTabUI::IsDiscoveryInNTPEnabled() {
return CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableSuggestionsTabPage);
+ switches::kEnableDiscoveryInNewTabPage);
}
// static
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.h ('k') | chrome/browser/ui/webui/ntp/ntp_resource_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698