diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-10 09:17:08 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-10 09:17:08 +0000 |
commit | ebfd4b915548df519779cae0853fe34f31af36da (patch) | |
tree | 2562b4516607c859c36209bb56239dc0ced93b16 /chrome/browser/resources/ntp/apps.js | |
parent | d57d13a6fbea0fc868f8a334857e228989cfbfdf (diff) | |
download | chromium_src-ebfd4b915548df519779cae0853fe34f31af36da.zip chromium_src-ebfd4b915548df519779cae0853fe34f31af36da.tar.gz chromium_src-ebfd4b915548df519779cae0853fe34f31af36da.tar.bz2 |
Fix 57090: NTP apps sorted in random-looking order.
Add the concept of app_launch_index, stored with the extension that determines an install order which is used to order the apps on the new tab page.
BUG=57090
TEST=None
Review URL: http://codereview.chromium.org/3611014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62112 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/ntp/apps.js')
-rw-r--r-- | chrome/browser/resources/ntp/apps.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js index e6f79a2..da91af7 100644 --- a/chrome/browser/resources/ntp/apps.js +++ b/chrome/browser/resources/ntp/apps.js @@ -14,6 +14,10 @@ function getAppsCallback(data) { appsSectionContent.removeChild(appsSectionContent.lastChild); } + data.apps.sort(function(a,b) { + return a.app_launch_index - b.app_launch_index + }); + clearClosedMenu(apps.menu); if (data.apps.length == 0) { appsSection.classList.add('disabled'); |