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

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

Issue 12331003: Apps that don't appear on the NTP shouldn't contribute to NTP page overflow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean up Created 7 years, 10 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 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);
};

Powered by Google App Engine
This is Rietveld 408576698