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

Unified Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 9340007: Make the Chrome Web Store Icon Syncable (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removing braces Created 8 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
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.h ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/app_launcher_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index dfc0cb86288eb52c2cc27f021018b7e39cb19782..a3fa67200ee2701a15c0349707e6795cffe417d5 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -97,16 +97,6 @@ static DictionaryValue* SerializeNotification(
return dictionary;
}
-// static
-bool AppLauncherHandler::IsAppExcludedFromList(const Extension* extension) {
- // The Cloud Print app should never be displayed in the NTP.
- if (!extension->is_app() ||
- (extension->id() == extension_misc::kCloudPrintAppId)) {
- return true;
- }
- return false;
-}
-
void AppLauncherHandler::CreateAppInfo(const Extension* extension,
const AppNotification* notification,
ExtensionService* service,
@@ -351,7 +341,7 @@ void AppLauncherHandler::FillAppDictionary(DictionaryValue* dictionary) {
ExtensionSet::const_iterator it;
for (it = extensions->begin(); it != extensions->end(); ++it) {
const Extension* extension = *it;
- if (!IsAppExcludedFromList(extension)) {
+ if (extension->ShouldDisplayInLauncher()) {
DictionaryValue* app_info = GetAppInfo(extension);
list->Append(app_info);
} else {
@@ -368,7 +358,7 @@ void AppLauncherHandler::FillAppDictionary(DictionaryValue* dictionary) {
extensions = extension_service_->disabled_extensions();
for (it = extensions->begin(); it != extensions->end(); ++it) {
- if (!IsAppExcludedFromList(*it)) {
+ if ((*it)->ShouldDisplayInLauncher()) {
DictionaryValue* app_info = new DictionaryValue();
CreateAppInfo(*it,
NULL,
@@ -380,7 +370,7 @@ void AppLauncherHandler::FillAppDictionary(DictionaryValue* dictionary) {
extensions = extension_service_->terminated_extensions();
for (it = extensions->begin(); it != extensions->end(); ++it) {
- if (!IsAppExcludedFromList(*it)) {
+ if ((*it)->ShouldDisplayInLauncher()) {
DictionaryValue* app_info = new DictionaryValue();
CreateAppInfo(*it,
NULL,
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.h ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698