Commit bddf240a authored by treib@chromium.org's avatar treib@chromium.org

Apps&Extensions for supervised users: Cleanup

Remove an obsolete "already loaded" check.
Allow all component locations, not just Manifest::COMPONENT.

BUG=none

Review URL: https://codereview.chromium.org/404773003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284182 0039d316-1c4b-4281-b951-d872f2087c98
parent 65a0687a
...@@ -275,16 +275,6 @@ bool SupervisedUserService::UserMayLoad(const extensions::Extension* extension, ...@@ -275,16 +275,6 @@ bool SupervisedUserService::UserMayLoad(const extensions::Extension* extension,
if (ExtensionManagementPolicyImpl(extension, &tmp_error)) if (ExtensionManagementPolicyImpl(extension, &tmp_error))
return true; return true;
// If the extension is already loaded, we allow it, otherwise we'd unload
// all existing extensions.
ExtensionService* extension_service =
extensions::ExtensionSystem::Get(profile_)->extension_service();
// |extension_service| can be NULL in a unit test.
if (extension_service &&
extension_service->GetInstalledExtension(extension->id()))
return true;
bool was_installed_by_default = extension->was_installed_by_default(); bool was_installed_by_default = extension->was_installed_by_default();
bool was_installed_by_custodian = extension->was_installed_by_custodian(); bool was_installed_by_custodian = extension->was_installed_by_custodian();
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
...@@ -297,7 +287,7 @@ bool SupervisedUserService::UserMayLoad(const extensions::Extension* extension, ...@@ -297,7 +287,7 @@ bool SupervisedUserService::UserMayLoad(const extensions::Extension* extension,
was_installed_by_default = was_installed_by_default =
extensions::Manifest::IsExternalLocation(extension->location()); extensions::Manifest::IsExternalLocation(extension->location());
#endif #endif
if (extension->location() == extensions::Manifest::COMPONENT || if (extensions::Manifest::IsComponentLocation(extension->location()) ||
was_installed_by_default || was_installed_by_default ||
was_installed_by_custodian) { was_installed_by_custodian) {
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment