Index: chrome/browser/ui/webui/extensions/extension_settings_handler.cc |
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc |
index ec898a88135771bbd1d0284150b77274d1699e21..da63609edee97789e37233b87ea49f03cbf3220f 100644 |
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc |
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc |
@@ -238,8 +238,13 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue( |
!management_policy_->UserMayModifySettings(extension, NULL); |
extension_data->SetBoolean("managedInstall", managed_install); |
+ bool recommended_install = |
+ !managed_install && |
+ management_policy_->MustRemainInstalled(extension, NULL); |
+ extension_data->SetBoolean("recommendedInstall", recommended_install); |
+ |
// We should not get into a state where both are true. |
Finnur
2014/10/06 14:01:42
Nit: This comment is now out of date. Perhaps:
//
binjin
2014/10/06 18:48:47
Done.
|
- DCHECK(!managed_install || !suspicious_install); |
+ DCHECK(!(managed_install || recommended_install) || !suspicious_install); |
GURL icon = |
ExtensionIconSource::GetIconURL(extension, |
@@ -313,7 +318,9 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue( |
extension_service_->GetBrowserContext())); |
base::string16 location_text; |
- if (Manifest::IsPolicyLocation(extension->location())) { |
+ if (Manifest::IsPolicyLocation(extension->location()) || |
+ (extension->location() == Manifest::EXTERNAL_PREF_DOWNLOAD && |
+ recommended_install)) { |
location_text = l10n_util::GetStringUTF16( |
IDS_OPTIONS_INSTALL_LOCATION_ENTERPRISE); |
} else if (extension->location() == Manifest::INTERNAL && |
@@ -532,6 +539,8 @@ void ExtensionSettingsHandler::GetLocalizedValues( |
l10n_util::GetStringUTF16(IDS_EXTENSIONS_VISIT_WEBSTORE)); |
source->AddString("extensionSettingsPolicyControlled", |
l10n_util::GetStringUTF16(IDS_EXTENSIONS_POLICY_CONTROLLED)); |
+ source->AddString("extensionSettingsPolicyRecommeneded", |
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_POLICY_RECOMMENDED)); |
source->AddString("extensionSettingsDependentExtensions", |
l10n_util::GetStringUTF16(IDS_EXTENSIONS_DEPENDENT_EXTENSIONS)); |
source->AddString("extensionSettingsSupervisedUser", |