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

Unified Diff: chrome/browser/extensions/extension_prefs.cc

Issue 6297013: [NTP] Allow reordering of apps via drag and drop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: incorporate feedback Created 9 years, 11 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
Index: chrome/browser/extensions/extension_prefs.cc
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index 3f6bb88dfc3597c1eccd1079af12ee52dd871425..33ced74134ae65cc4204007d1b594814a173eb74 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -1101,6 +1101,17 @@ int ExtensionPrefs::GetNextAppLaunchIndex() {
return max_value + 1;
}
+void ExtensionPrefs::SetAppLauncherOrder(
+ const std::vector<std::string>& extension_ids) {
+ for (size_t i = 0; i < extension_ids.size(); ++i)
+ SetAppLaunchIndex(extension_ids.at(i), i);
+
+ NotificationService::current()->Notify(
+ NotificationType::EXTENSION_LAUNCHER_REORDERED,
+ Source<ExtensionPrefs>(this),
+ NotificationService::NoDetails());
+}
+
void ExtensionPrefs::SetUpdateUrlData(const std::string& extension_id,
const std::string& data) {
DictionaryValue* dictionary = GetExtensionPref(extension_id);

Powered by Google App Engine
This is Rietveld 408576698