Chromium Code Reviews| Index: chrome/browser/extensions/installed_loader.cc |
| =================================================================== |
| --- chrome/browser/extensions/installed_loader.cc (revision 136836) |
| +++ chrome/browser/extensions/installed_loader.cc (working copy) |
| @@ -69,8 +69,15 @@ |
| // An explicit check against policy is required to behave correctly during |
| // startup. This is because extensions that were previously OK might have |
| // been blacklisted in policy while Chrome was not running. |
| - if (!extension_prefs_->IsExtensionAllowedByPolicy(info.extension_id, |
| - info.extension_location)) { |
| + // This isn't a new extension installation, so it's OK if some extension |
| + // management policy delegates aren't yet registered with the |
| + // ExtensionService. Admin policy is handled by the ExtensionPrefs class, |
| + // which is created before the ExtensionService itself, so we have what we |
| + // need here. |
| + if (!extension_service_->extension_management_policy()-> |
| + UserMayInstall(info.extension_id, info.extension_location, std::string(), |
|
Aaron Boodman
2012/05/17 22:41:06
Maybe the name of this method should be UserMayRun
|
| + NULL)) { |
| + // The error message from UserMayInstall() is not well suited to this UI. |
|
Aaron Boodman
2012/05/17 22:41:06
Why?
Pam (message me for reviews)
2012/05/18 20:15:15
It is typically IDS_EXTENSION_CANT_INSTALL_POLICY_
|
| error = errors::kDisabledByPolicy; |
| } else if (info.extension_manifest.get()) { |
| extension = Extension::Create( |
|
Pam (message me for reviews)
2012/05/18 20:15:15
Is it permissible to Create the extension before c
|