Index: chrome/browser/resources/ntp_search/new_tab.js |
diff --git a/chrome/browser/resources/ntp_search/new_tab.js b/chrome/browser/resources/ntp_search/new_tab.js |
index 4a83ddb3898d3e0d1faaa3ace6d65af430a909cd..b6daae5fd3f996d306454584c109ef8b3bcb8cee 100644 |
--- a/chrome/browser/resources/ntp_search/new_tab.js |
+++ b/chrome/browser/resources/ntp_search/new_tab.js |
@@ -417,19 +417,19 @@ cr.define('ntp', function() { |
if (page) |
page.removeAllTiles(); |
- // Get the array of apps and add any special synthesized entries |
+ // Get the array of apps and add any special synthesized entries. |
var apps = data.apps; |
- // Sort by launch ordinal |
+ // Sort alphabetically. |
apps.sort(function(a, b) { |
- return a.app_launch_ordinal > b.app_launch_ordinal ? 1 : |
- a.app_launch_ordinal < b.app_launch_ordinal ? -1 : 0; |
+ return a.title.toLocaleLowerCase() > b.title.toLocaleLowerCase() ? 1 : |
+ a.title.toLocaleLowerCase() < b.title.toLocaleLowerCase() ? -1 : 0; |
}); |
// An app to animate (in case it was just installed). |
var highlightApp; |
- // Add the apps, creating pages as necessary |
+ // Add the apps, creating pages as necessary. |
this.appendTilePage(new ntp.AppsPage(), |
loadTimeData.getString('appDefaultPageName')); |
for (var i = 0; i < apps.length; i++) { |