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

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 static, CHECK -> ERROR 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..30898a523b2841fe11cc5ca4f77af3abb97a4a5d 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 deptermined.
csharp 2013/05/24 18:37:12 Nit: deptermined -> determined
stevenjb 2013/05/24 18:40:56 Done.
+ 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