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..3db0ebb92e23c4f7cdfd19430038adc89036ec19 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 && |
tfarina
2013/01/24 14:15:58
indent two more spaces.
dconnelly
2013/01/24 14:30:51
Done.
|
+ profile_->GetPrefs()->GetBoolean(prefs::kHideWebStoreIcon); |
+ if ((*app)->ShouldDisplayInAppLauncher() && !blocked_by_policy) |
apps->push_back(new ExtensionAppItem(profile_, *app, controller_)); |
} |
} |