| Index: chrome/browser/extensions/extension_prefs.cc
|
| diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
|
| index 93378302def373cecd331cdd8b81de8a2f99dba4..fa33df4b7d52cc4c27fc8a20eb99efa055c018b9 100644
|
| --- a/chrome/browser/extensions/extension_prefs.cc
|
| +++ b/chrome/browser/extensions/extension_prefs.cc
|
| @@ -925,6 +925,24 @@ void ExtensionPrefs::AddGrantedPermissions(
|
| extension_id, kPrefGrantedPermissions, new_perms.get());
|
| }
|
|
|
| +void ExtensionPrefs::RemoveGrantedPermissions(
|
| + const std::string& extension_id,
|
| + const ExtensionPermissionSet* permissions) {
|
| + CHECK(Extension::IdIsValid(extension_id));
|
| +
|
| + scoped_refptr<ExtensionPermissionSet> granted_permissions(
|
| + GetGrantedPermissions(extension_id));
|
| +
|
| + // The new granted permissions are the difference of the already granted
|
| + // permissions and the newly ungranted permissions.
|
| + scoped_refptr<ExtensionPermissionSet> new_perms(
|
| + ExtensionPermissionSet::CreateDifference(
|
| + granted_permissions.get(), permissions));
|
| +
|
| + SetExtensionPrefPermissionSet(
|
| + extension_id, kPrefGrantedPermissions, new_perms.get());
|
| +}
|
| +
|
| ExtensionPermissionSet* ExtensionPrefs::GetActivePermissions(
|
| const std::string& extension_id) {
|
| CHECK(Extension::IdIsValid(extension_id));
|
|
|