diff options
author | rdevlin.cronin <rdevlin.cronin@chromium.org> | 2015-09-24 15:35:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-24 22:36:35 +0000 |
commit | e2d0fd0ad14bfd0cd82e0093b1488103af532c8e (patch) | |
tree | c44c2f971ace4bdfcfcc65df42eb629b74cdc40a /extensions/common/extension.h | |
parent | 8723a2c2a90e060006d1b45a6ce58bacf17bb9d8 (diff) | |
download | chromium_src-e2d0fd0ad14bfd0cd82e0093b1488103af532c8e.zip chromium_src-e2d0fd0ad14bfd0cd82e0093b1488103af532c8e.tar.gz chromium_src-e2d0fd0ad14bfd0cd82e0093b1488103af532c8e.tar.bz2 |
[Extensions] Un-refcount PermissionSet
PermissionSet represents a set of permissions, and for some reason,
it's been refcounted. There's really no reason to have it, and it
makes everything more costly and difficult to reason about. Remove the
refcounting.
Note: This is part 1 of a 2-part series. This removes the ref-counting.
In a followup, I'll go through and update many of the places that
use const PermissionSet* and convert to const &.
BUG=455414
TBR=thestig@chromium.org (misc chrome files with ptr conversion)
TBR=nasko@chromium.org (extension messages - not actually changing any IPC messages)
Review URL: https://codereview.chromium.org/1349613003
Cr-Commit-Position: refs/heads/master@{#350684}
Diffstat (limited to 'extensions/common/extension.h')
-rw-r--r-- | extensions/common/extension.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/extensions/common/extension.h b/extensions/common/extension.h index 4d7f568..215d99a 100644 --- a/extensions/common/extension.h +++ b/extensions/common/extension.h @@ -574,12 +574,11 @@ struct UpdatedExtensionPermissionsInfo { // The permissions that have changed. For Reason::ADDED, this would contain // only the permissions that have added, and for Reason::REMOVED, this would // only contain the removed permissions. - const PermissionSet* permissions; + const PermissionSet& permissions; - UpdatedExtensionPermissionsInfo( - const Extension* extension, - const PermissionSet* permissions, - Reason reason); + UpdatedExtensionPermissionsInfo(const Extension* extension, + const PermissionSet& permissions, + Reason reason); }; } // namespace extensions |