diff options
author | dcheng <dcheng@chromium.org> | 2014-08-25 22:05:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-26 05:06:55 +0000 |
commit | c704794140dcfe95c002c7b0bfd7361f33088190 (patch) | |
tree | c78e5d70e95737ee4c5b5599717335903999b0ae /chrome/browser/extensions/permissions_updater.cc | |
parent | 1bba58e7ed1fdfb97d53f7ed26df5571c2e9d7c5 (diff) | |
download | chromium_src-c704794140dcfe95c002c7b0bfd7361f33088190.zip chromium_src-c704794140dcfe95c002c7b0bfd7361f33088190.tar.gz chromium_src-c704794140dcfe95c002c7b0bfd7361f33088190.tar.bz2 |
Remove implicit conversions from scoped_refptr to T* in chrome/browser/extensions/
This patch was generated by running the rewrite_scoped_refptr clang tool
on a Linux build.
BUG=110610
Review URL: https://codereview.chromium.org/508513002
Cr-Commit-Position: refs/heads/master@{#291844}
Diffstat (limited to 'chrome/browser/extensions/permissions_updater.cc')
-rw-r--r-- | chrome/browser/extensions/permissions_updater.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/extensions/permissions_updater.cc b/chrome/browser/extensions/permissions_updater.cc index f28ecdd..1b13c67 100644 --- a/chrome/browser/extensions/permissions_updater.cc +++ b/chrome/browser/extensions/permissions_updater.cc @@ -64,7 +64,7 @@ scoped_refptr<const PermissionSet> GetBoundedActivePermissions( // If the extension has used the optional permissions API, it will have a // custom set of active permissions defined in the extension prefs. Here, // we update the extension's active permissions based on the prefs. - if (!active_permissions) + if (!active_permissions.get()) return extension->permissions_data()->active_permissions(); scoped_refptr<const PermissionSet> required_permissions = @@ -75,16 +75,17 @@ scoped_refptr<const PermissionSet> GetBoundedActivePermissions( // a) active permissions must be a subset of optional + default permissions // b) active permissions must contains all default permissions scoped_refptr<PermissionSet> total_permissions = PermissionSet::CreateUnion( - required_permissions, + required_permissions.get(), PermissionsParser::GetOptionalPermissions(extension)); // Make sure the active permissions contain no more than optional + default. scoped_refptr<PermissionSet> adjusted_active = - PermissionSet::CreateIntersection(total_permissions, active_permissions); + PermissionSet::CreateIntersection(total_permissions.get(), + active_permissions.get()); // Make sure the active permissions contain the default permissions. - adjusted_active = - PermissionSet::CreateUnion(required_permissions, adjusted_active); + adjusted_active = PermissionSet::CreateUnion(required_permissions.get(), + adjusted_active.get()); return adjusted_active; } @@ -194,7 +195,7 @@ void PermissionsUpdater::InitializePermissions(const Extension* extension) { // For example, the union of <all_urls> and "example.com" is <all_urls>, so // we may lose "example.com". However, "example.com" is important once // <all_urls> is stripped during withholding. - if (active_permissions) { + if (active_permissions.get()) { granted_explicit_hosts.AddPatterns( FilterSingleOriginPermissions(active_permissions->explicit_hosts(), bounded_active->explicit_hosts())); |