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

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

Issue 16032004: Call CreateDefaultOrdinals() when needed, instead of on construction (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment Created 7 years, 7 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 d3fbe9069c36468e4175cdc841a370e77eb5f976..9c5ec799e8916d4c95e367464541b902b1e525c0 100644
--- a/chrome/browser/extensions/extension_sorting.h
+++ b/chrome/browser/extensions/extension_sorting.h
@@ -185,7 +185,7 @@ class ExtensionSorting {
// ordinals is updated with corresponding ordinals.
bool GetDefaultOrdinals(const std::string& extension_id,
syncer::StringOrdinal* page_ordinal,
- syncer::StringOrdinal* app_launch_ordinal) const;
+ syncer::StringOrdinal* app_launch_ordinal);
// Returns |app_launch_ordinal| if it has no collision in the page specified
// by |page_ordinal|. Otherwise, returns an ordinal after |app_launch_ordinal|
@@ -213,6 +213,10 @@ class ExtensionSorting {
// Defines the default ordinals.
AppOrdinalsMap default_ordinals_;
+ // Used to construct the default ordinals once when needed instead of on
+ // construction when the app order may not have been determined.
+ bool default_ordinals_created_;
+
// The set of extensions that don't appear in the new tab page.
std::set<std::string> ntp_hidden_extensions_;
« no previous file with comments | « chrome/browser/chromeos/extensions/default_app_order.cc ('k') | chrome/browser/extensions/extension_sorting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698