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/extensions/extension_prefs.h | |
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/extensions/extension_prefs.h')
-rw-r--r-- | chrome/browser/extensions/extension_prefs.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h index 7bfe9eb..97547ea 100644 --- a/chrome/browser/extensions/extension_prefs.h +++ b/chrome/browser/extensions/extension_prefs.h @@ -174,6 +174,19 @@ class ExtensionPrefs { bool GetWebStoreLogin(std::string* result); void SetWebStoreLogin(const std::string& login); + // Get the application launch index for an extension with |extension_id|. This + // determines the order of which the applications appear on the New Tab Page. + // A value of 0 generally indicates top left. If the extension has no launch + // index a -1 value is returned. + int GetAppLaunchIndex(const std::string& extension_id); + + // Sets a specific launch index for an extension with |extension_id|. + void SetAppLaunchIndex(const std::string& extension_id, int index); + + // Gets the next available application launch index. This is 1 higher than the + // highest current application launch index found. + int GetNextAppLaunchIndex(); + static void RegisterUserPrefs(PrefService* prefs); // The underlying PrefService. |