Index: chrome/browser/ui/app_list/apps_model_builder.cc |
diff --git a/chrome/browser/ui/app_list/apps_model_builder.cc b/chrome/browser/ui/app_list/apps_model_builder.cc |
index cfc0d166515a8813410ac4a54e74080c312c8851..0d69dda97e2db00e5245ae9822a32b60bc217cde 100644 |
--- a/chrome/browser/ui/app_list/apps_model_builder.cc |
+++ b/chrome/browser/ui/app_list/apps_model_builder.cc |
@@ -15,6 +15,7 @@ |
#include "chrome/browser/ui/app_list/extension_app_item.h" |
#include "chrome/common/chrome_notification_types.h" |
#include "chrome/common/extensions/extension.h" |
+#include "chrome/common/pref_names.h" |
#include "content/public/browser/notification_service.h" |
using extensions::Extension; |
@@ -77,7 +78,11 @@ void AppsModelBuilder::Build() { |
void AppsModelBuilder::AddApps(const ExtensionSet* extensions, Apps* apps) { |
for (ExtensionSet::const_iterator app = extensions->begin(); |
app != extensions->end(); ++app) { |
- if ((*app)->ShouldDisplayInAppLauncher()) |
+ // If it's the web store, check the policy. |
+ bool blocked_by_policy = |
+ (*app)->id() == extension_misc::kWebStoreAppId && |
Joao da Silva
2013/01/25 09:10:12
#include "chrome/common/extensions/extension_const
dconnelly
2013/01/25 15:50:07
Done.
|
+ profile_->GetPrefs()->GetBoolean(prefs::kHideWebStoreIcon); |
+ if ((*app)->ShouldDisplayInAppLauncher() && !blocked_by_policy) |
Joao da Silva
2013/01/25 09:10:12
I suggest adding a new method to do these checks,
dconnelly
2013/01/25 15:50:07
Done.
|
apps->push_back(new ExtensionAppItem(profile_, *app, controller_)); |
} |
} |