| Index: chrome/browser/extensions/permissions_updater.cc
|
| diff --git a/chrome/browser/extensions/permissions_updater.cc b/chrome/browser/extensions/permissions_updater.cc
|
| index 1b13c6750748c7e5d0e1899e73b421aaa7fb1472..ef8192164a87742a76508c72e14be93b3f06a47f 100644
|
| --- a/chrome/browser/extensions/permissions_updater.cc
|
| +++ b/chrome/browser/extensions/permissions_updater.cc
|
| @@ -164,11 +164,23 @@ void PermissionsUpdater::GrantActivePermissions(const Extension* extension) {
|
| }
|
|
|
| void PermissionsUpdater::InitializePermissions(const Extension* extension) {
|
| - scoped_refptr<const PermissionSet> active_permissions =
|
| - ExtensionPrefs::Get(browser_context_)
|
| - ->GetActivePermissions(extension->id());
|
| - scoped_refptr<const PermissionSet> bounded_active =
|
| - GetBoundedActivePermissions(extension, active_permissions);
|
| + InitializePermissions(extension, INIT_FLAG_NONE);
|
| +}
|
| +
|
| +void PermissionsUpdater::InitializePermissions(const Extension* extension,
|
| + InitFlag init_flag) {
|
| + scoped_refptr<const PermissionSet> active_permissions(NULL);
|
| + scoped_refptr<const PermissionSet> bounded_active(NULL);
|
| + // If |extension| is a transient dummy extension, we do not want to look for
|
| + // it in preferences.
|
| + if (init_flag & INIT_FLAG_TRANSIENT) {
|
| + bounded_active = active_permissions =
|
| + extension->permissions_data()->active_permissions();
|
| + } else {
|
| + active_permissions = ExtensionPrefs::Get(browser_context_)
|
| + ->GetActivePermissions(extension->id());
|
| + bounded_active = GetBoundedActivePermissions(extension, active_permissions);
|
| + }
|
|
|
| // Withhold permissions only if the switch applies to this extension and the
|
| // extension doesn't have the preference to allow scripting on all urls.
|
|
|