| Index: chrome/browser/extensions/api/developer_private/extension_info_generator.cc
|
| diff --git a/chrome/browser/extensions/api/developer_private/extension_info_generator.cc b/chrome/browser/extensions/api/developer_private/extension_info_generator.cc
|
| index 4061e944637c608011f3b0314a13f24a29b9184d..7e047a97657d24bfbc2a2be926ec98b913354c75 100644
|
| --- a/chrome/browser/extensions/api/developer_private/extension_info_generator.cc
|
| +++ b/chrome/browser/extensions/api/developer_private/extension_info_generator.cc
|
| @@ -257,6 +257,24 @@ void ExtensionInfoGenerator::CreateExtensionInfoHelper(
|
| new std::string(l10n_util::GetStringUTF8(blacklist_text)));
|
| }
|
|
|
| + Profile* profile = Profile::FromBrowserContext(browser_context_);
|
| +
|
| + if (Manifest::IsPolicyLocation(extension.location())) {
|
| + info->controlled_by.reset(new std::string("policy"));
|
| + info->controlled_by_text.reset(new std::string(
|
| + l10n_util::GetStringUTF8(IDS_OPTIONS_INSTALL_LOCATION_ENTERPRISE)));
|
| + } else if (util::IsExtensionSupervised(&extension, profile)) {
|
| + if (profile->IsChild()) {
|
| + info->controlled_by.reset(new std::string("child-custodian"));
|
| + info->controlled_by_text.reset(new std::string(l10n_util::GetStringUTF8(
|
| + IDS_EXTENSIONS_INSTALLED_BY_CHILD_CUSTODIAN)));
|
| + } else {
|
| + info->controlled_by.reset(new std::string("supervised-user-custodian"));
|
| + info->controlled_by_text.reset(new std::string(l10n_util::GetStringUTF8(
|
| + IDS_EXTENSIONS_INSTALLED_BY_SUPERVISED_USER_CUSTODIAN)));
|
| + }
|
| + }
|
| +
|
| // Dependent extensions.
|
| if (extension.is_shared_module()) {
|
| scoped_ptr<ExtensionSet> dependent_extensions =
|
| @@ -302,10 +320,6 @@ void ExtensionInfoGenerator::CreateExtensionInfoHelper(
|
| info->incognito_access.is_active =
|
| util::IsIncognitoEnabled(extension.id(), browser_context_);
|
|
|
| - Profile* profile = Profile::FromBrowserContext(browser_context_);
|
| - info->installed_by_custodian =
|
| - util::IsExtensionSupervised(&extension, profile);
|
| -
|
| // Install warnings (only if unpacked and no error console).
|
| if (!error_console_enabled &&
|
| Manifest::IsUnpackedLocation(extension.location())) {
|
| @@ -391,11 +405,6 @@ void ExtensionInfoGenerator::CreateExtensionInfoHelper(
|
| extensions::path_util::PrettifyPath(extension.path()).AsUTF8Unsafe()));
|
| }
|
|
|
| - if (Manifest::IsPolicyLocation(extension.location())) {
|
| - info->policy_text.reset(new std::string(
|
| - l10n_util::GetStringUTF8(IDS_OPTIONS_INSTALL_LOCATION_ENTERPRISE)));
|
| - }
|
| -
|
| // Runs on all urls.
|
| info->run_on_all_urls.is_enabled =
|
| (FeatureSwitch::scripts_require_action()->IsEnabled() &&
|
|
|