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

Unified Diff: athena/extensions/extension_app_model_builder.cc

Issue 647643002: Skips Chrome icon in Athena home card. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/extensions/extension_app_model_builder.cc
diff --git a/athena/extensions/extension_app_model_builder.cc b/athena/extensions/extension_app_model_builder.cc
index 461fd8a44cea8630c3d216ecd2ba216798c2ea13..92ee81f7dc686f69d2b66bc4e3524cd9f18e9d7a 100644
--- a/athena/extensions/extension_app_model_builder.cc
+++ b/athena/extensions/extension_app_model_builder.cc
@@ -20,6 +20,10 @@ namespace athena {
namespace {
+// Copied from chrome/common/extensions/extension_constants.h
+// TODO(mukai): move constants to src/extensions
+const char kChromeAppId[] = "mgndgikekgjfcpckkfioiadnlibdjbkf";
+
class AppItem : public app_list::AppListItem {
public:
AppItem(scoped_refptr<const extensions::Extension> extension,
@@ -68,8 +72,11 @@ void ExtensionAppModelBuilder::PopulateApps(app_list::AppListModel* model) {
for (extensions::ExtensionSet::const_iterator iter = extensions.begin();
iter != extensions.end();
++iter) {
+ // Chrome icon is currently disabled for homecard since it's not meaningful.
+ // http://crbug.com/421677
// TODO(mukai): use chrome/browser/extension_ui_util.
- if ((*iter)->ShouldDisplayInAppLauncher()) {
+ if ((*iter)->ShouldDisplayInAppLauncher() &&
+ (*iter)->id() != kChromeAppId) {
model->AddItem(scoped_ptr<app_list::AppListItem>(
new AppItem(*iter, browser_context_)));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698