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

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

Issue 1141843004: NTP Zombie Code Slayer II: Suggestions Page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: and remove urls Created 5 years, 7 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 e91fe6b928c84bb8aff5f94b28f78a67ea8c72f6..d43f22f69bf1fa34677e5745c8c69bf9d3529164 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -26,7 +26,6 @@
#include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h"
#include "chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h"
#include "chrome/browser/ui/webui/ntp/ntp_user_data_logger.h"
-#include "chrome/browser/ui/webui/ntp/suggestions_page_handler.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/generated_resources.h"
@@ -99,8 +98,6 @@ NewTabUI::NewTabUI(content::WebUI* web_ui)
web_ui->AddMessageHandler(new FaviconWebUIHandler());
web_ui->AddMessageHandler(new NewTabPageHandler());
web_ui->AddMessageHandler(new CoreAppLauncherHandler());
- if (NewTabUI::IsDiscoveryInNTPEnabled())
- web_ui->AddMessageHandler(new SuggestionsHandler());
web_ui->AddMessageHandler(new NewTabPageSyncHandler());
ExtensionService* service =
@@ -124,13 +121,6 @@ NewTabUI::NewTabUI(content::WebUI* web_ui)
scoped_ptr<NewTabHTMLSource> html_source(
new NewTabHTMLSource(profile->GetOriginalProfile()));
- // These two resources should be loaded only if suggestions NTP is enabled.
- html_source->AddResource("suggestions_page.css", "text/css",
- NewTabUI::IsDiscoveryInNTPEnabled() ? IDR_SUGGESTIONS_PAGE_CSS : 0);
- if (NewTabUI::IsDiscoveryInNTPEnabled()) {
- html_source->AddResource("suggestions_page.js", "application/javascript",
- IDR_SUGGESTIONS_PAGE_JS);
- }
// content::URLDataSource assumes the ownership of the html_source.
content::URLDataSource::Add(profile, html_source.release());
@@ -224,8 +214,6 @@ void NewTabUI::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
CoreAppLauncherHandler::RegisterProfilePrefs(registry);
NewTabPageHandler::RegisterProfilePrefs(registry);
- if (NewTabUI::IsDiscoveryInNTPEnabled())
- SuggestionsHandler::RegisterProfilePrefs(registry);
MostVisitedHandler::RegisterProfilePrefs(registry);
browser_sync::ForeignSessionHandler::RegisterProfilePrefs(registry);
}
@@ -241,13 +229,6 @@ bool NewTabUI::ShouldShowApps() {
}
// static
-bool NewTabUI::IsDiscoveryInNTPEnabled() {
- // TODO(beaudoin): The flag was removed during a clean-up pass. We leave that
- // here to easily enable it back when we will explore this option again.
- return false;
-}
-
-// static
void NewTabUI::SetUrlTitleAndDirection(base::DictionaryValue* dictionary,
const base::string16& title,
const GURL& gurl) {
« 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