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

Unified Diff: chrome/browser/resources/ntp4/page_list_view.js

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/resources/ntp4/new_tab.js ('k') | chrome/browser/resources/ntp4/suggestions_page.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp4/page_list_view.js
diff --git a/chrome/browser/resources/ntp4/page_list_view.js b/chrome/browser/resources/ntp4/page_list_view.js
index 14c613b3b994f9690a16fe649c61ef7c89cbca7d..fa1513b9bd39098318c04f08da54c9014ae5f2a3 100644
--- a/chrome/browser/resources/ntp4/page_list_view.js
+++ b/chrome/browser/resources/ntp4/page_list_view.js
@@ -86,12 +86,6 @@ cr.define('ntp', function() {
appsPages: undefined,
/**
- * The Suggestions page.
- * @type {!Element|undefined}
- */
- suggestionsPage: undefined,
-
- /**
* The Most Visited page.
* @type {!Element|undefined}
*/
@@ -273,11 +267,6 @@ cr.define('ntp', function() {
this.mostVisitedPage = page;
}
- if (typeof ntp.SuggestionsPage != 'undefined' &&
- page instanceof ntp.SuggestionsPage) {
- this.suggestionsPage = page;
- }
-
// If we're appending an AppsPage and it's a temporary page, animate it.
var animate = page instanceof ntp.AppsPage &&
page.classList.contains('temporary');
@@ -536,19 +525,6 @@ cr.define('ntp', function() {
this.tilePages.length - 1));
this.cardSlider.setCards(Array.prototype.slice.call(this.tilePages),
pageNo);
- // The shownPage property was potentially saved from a previous webui that
- // didn't have the same set of pages as the current one. So we cascade
- // from suggestions, to most visited and then to apps because we can have
- // an page with apps only (e.g., chrome://apps) or one with only the most
- // visited, but not one with only suggestions. And we alwayd default to
- // most visited first when previously shown page is not availabel anymore.
- // If most visited isn't there either, we go to apps.
- if (this.shownPage == loadTimeData.getInteger('suggestions_page_id')) {
- if (this.suggestionsPage)
- this.cardSlider.selectCardByValue(this.suggestionsPage);
- else
- this.shownPage = loadTimeData.getInteger('most_visited_page_id');
- }
if (this.shownPage == loadTimeData.getInteger('most_visited_page_id')) {
if (this.mostVisitedPage)
this.cardSlider.selectCardByValue(this.mostVisitedPage);
@@ -692,8 +668,6 @@ cr.define('ntp', function() {
} else if (page.classList.contains('most-visited-page')) {
this.setShownPage_(
loadTimeData.getInteger('most_visited_page_id'), 0);
- } else if (page.classList.contains('suggestions-page')) {
- this.setShownPage_(loadTimeData.getInteger('suggestions_page_id'), 0);
} else {
console.error('unknown page selected');
}
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.js ('k') | chrome/browser/resources/ntp4/suggestions_page.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698