Chromium Code Reviews| Index: chrome/browser/extensions/extension_sorting.h |
| diff --git a/chrome/browser/extensions/extension_sorting.h b/chrome/browser/extensions/extension_sorting.h |
| index a661bf058a0d19d29493302ba041dbdc2c6145bc..5efedfa115f5c8bb195c23eb0c87760efb15b6d4 100644 |
| --- a/chrome/browser/extensions/extension_sorting.h |
| +++ b/chrome/browser/extensions/extension_sorting.h |
| @@ -6,6 +6,7 @@ |
| #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SORTING_H_ |
| #include <map> |
| +#include <set> |
| #include <string> |
| #include "base/basictypes.h" |
| @@ -101,6 +102,9 @@ class ExtensionSorting { |
| // O(# of apps) worst-case. |
| syncer::StringOrdinal PageIntegerAsStringOrdinal(size_t page_index); |
| + // Hidden extensions don't appear in the new tab page. |
| + void MarkExtensionAsHidden(const std::string& extension_id); |
|
tapted
2013/02/26 03:38:49
I think the member names need to mention NTP, or t
koz (OOO until 15th September)
2013/02/26 03:58:37
Yep, good point. Done.
|
| + |
| private: |
| // Unit tests. |
| friend class ExtensionSortingDefaultOrdinalsBase; |
| @@ -179,6 +183,9 @@ class ExtensionSorting { |
| const syncer::StringOrdinal& page_ordinal, |
| const syncer::StringOrdinal& app_launch_ordinal) const; |
| + // Returns the number of non hidden items in |m|. |
|
tapted
2013/02/26 03:38:49
ubernit: "non" -> "non-"
koz (OOO until 15th September)
2013/02/26 03:58:37
hahaha ubernit. I love it! Fixed :-)
|
| + size_t CountNonHiddenItems(const AppLaunchOrdinalMap& m) const; |
| + |
| ExtensionScopedPrefs* extension_scoped_prefs_; // Weak, owns this instance. |
| PrefService* pref_service_; // Weak. |
| ExtensionServiceInterface* extension_service_; // Weak. |
| @@ -205,6 +212,9 @@ class ExtensionSorting { |
| // Defines the default ordinals. |
| AppOrdinalsMap default_ordinals_; |
| + // The set of extensions that don't appear in the new tab page. |
| + std::set<std::string> hidden_extensions_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ExtensionSorting); |
| }; |