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

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

Issue 10068001: [NTP4] Fix empty apps page crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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.h
diff --git a/chrome/browser/extensions/extension_sorting.h b/chrome/browser/extensions/extension_sorting.h
index b0bf38a6079b5b7dbd76be2bab455b13a0d34a55..e0156b112437106d5131d1a948a3c58f8eb041c8 100644
--- a/chrome/browser/extensions/extension_sorting.h
+++ b/chrome/browser/extensions/extension_sorting.h
@@ -93,7 +93,7 @@ class ExtensionSorting {
// Converts the page index integer to its StringOrdinal equivalent. This takes
// O(# of apps) worst-case.
- StringOrdinal PageIntegerAsStringOrdinal(size_t page_index) const;
+ StringOrdinal PageIntegerAsStringOrdinal(size_t page_index);
private:
// Unit tests.
@@ -129,6 +129,9 @@ class ExtensionSorting {
const StringOrdinal& page_ordinal,
const StringOrdinal& app_launch_ordinal);
+ // Ensures |ntp_ordinal_map_| is of |required_size| number of entries.
+ void CreateOrdinalsIfNecessary(size_t required_size);
+
// Removes the mapping for |extension_id| with a page ordinal of
// |page_ordinal| and a app launch ordinal of |app_launch_ordinal|. If there
// is not matching map, nothing happens. This works with valid and invalid
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_sorting.cc » ('j') | chrome/browser/extensions/extension_sorting.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698