Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: extensions/renderer/dispatcher.cc

Issue 1349613003: [Extensions] Un-refcount PermissionSet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/common/permissions/permissions_data.cc ('k') | extensions/renderer/extension_injection_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/dispatcher.cc
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index 9530a8e9910072938f270378b9b77b216d87f052..fa475ca84485b0a0cdbb3244543d174166faf876 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -1155,9 +1155,9 @@ void Dispatcher::OnUpdatePermissions(
if (!extension)
return;
- scoped_refptr<const PermissionSet> active =
+ scoped_ptr<const PermissionSet> active =
params.active_permissions.ToPermissionSet();
- scoped_refptr<const PermissionSet> withheld =
+ scoped_ptr<const PermissionSet> withheld =
params.withheld_permissions.ToPermissionSet();
if (is_webkit_initialized_) {
@@ -1167,7 +1167,7 @@ void Dispatcher::OnUpdatePermissions(
active->effective_hosts());
}
- extension->permissions_data()->SetPermissions(active, withheld);
+ extension->permissions_data()->SetPermissions(active.Pass(), withheld.Pass());
UpdateBindings(extension->id());
}
@@ -1185,10 +1185,9 @@ void Dispatcher::OnUpdateTabSpecificPermissions(const GURL& visible_url,
extension->permissions_data()->GetEffectiveHostPermissions();
extension->permissions_data()->UpdateTabSpecificPermissions(
tab_id,
- new extensions::PermissionSet(extensions::APIPermissionSet(),
- extensions::ManifestPermissionSet(),
- new_hosts,
- extensions::URLPatternSet()));
+ extensions::PermissionSet(extensions::APIPermissionSet(),
+ extensions::ManifestPermissionSet(), new_hosts,
+ extensions::URLPatternSet()));
if (is_webkit_initialized_ && update_origin_whitelist) {
UpdateOriginPermissions(
« no previous file with comments | « extensions/common/permissions/permissions_data.cc ('k') | extensions/renderer/extension_injection_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698