Chromium Code Reviews| Index: chrome/browser/extensions/extension_util.cc |
| diff --git a/chrome/browser/extensions/extension_util.cc b/chrome/browser/extensions/extension_util.cc |
| index 4a861653b6ebb4e3906532324f16a8e501d3f259..bbdfe23da75983e881557b2df314c3c264840672 100644 |
| --- a/chrome/browser/extensions/extension_util.cc |
| +++ b/chrome/browser/extensions/extension_util.cc |
| @@ -220,6 +220,22 @@ void SetAllowFileAccess(const std::string& extension_id, |
| ReloadExtensionIfEnabled(extension_id, context); |
| } |
| +void SetIsInstalledByCustodian(const std::string& extension_id, |
| + content::BrowserContext* context, |
| + bool installed_by_custodian) { |
| + const Extension* extension = |
| + ExtensionRegistry::Get(context)->GetInstalledExtension(extension_id); |
| + if (extension && |
| + installed_by_custodian == extension->was_installed_by_custodian()) |
| + return; |
| + ExtensionPrefs::Get(context)->SetIsInstalledByCustodian( |
| + extension_id, installed_by_custodian); |
| + ExtensionService* service = |
| + ExtensionSystem::Get(context)->extension_service(); |
| + CHECK(service); |
|
Marc Treib
2016/06/13 09:37:14
?
mamir
2016/06/13 11:30:16
Done.
|
| + service->ReloadExtension(extension_id); |
| +} |
| + |
| bool AllowedScriptingOnAllUrls(const std::string& extension_id, |
| content::BrowserContext* context) { |
| bool allowed = false; |