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

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

Issue 17038002: Separate the NTP app ordering from the app list app ordering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change from notification to observer Created 7 years, 4 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_sorting.cc
diff --git a/chrome/browser/extensions/extension_sorting.cc b/chrome/browser/extensions/extension_sorting.cc
index 1af664016967990b99bdc57465f3227b3e67aa85..9c762c6d0c216b88d6b9bd2272744c5a47907ada 100644
--- a/chrome/browser/extensions/extension_sorting.cc
+++ b/chrome/browser/extensions/extension_sorting.cc
@@ -623,3 +623,15 @@ size_t ExtensionSorting::CountItemsVisibleOnNtp(
}
return result;
}
+
+void ExtensionSorting::GetOrderedExtensionIds(
+ extensions::ExtensionIdList* out) const {
+ for (PageOrdinalMap::const_iterator page_it = ntp_ordinal_map_.begin();
+ page_it != ntp_ordinal_map_.end(); ++page_it) {
+ const AppLaunchOrdinalMap& page = page_it->second;
+ for (AppLaunchOrdinalMap::const_iterator app_launch_it = page.begin();
+ app_launch_it != page.end(); ++app_launch_it) {
+ out->push_back(app_launch_it->second);
+ }
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698