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

Unified Diff: chrome/browser/extensions/active_tab_permission_manager.cc

Issue 10824149: Fix memory leak in ActiveTabPermissionManager. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 | « no previous file | chrome/common/extensions/extension.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/active_tab_permission_manager.cc
diff --git a/chrome/browser/extensions/active_tab_permission_manager.cc b/chrome/browser/extensions/active_tab_permission_manager.cc
index 67d6d58243137341ec85b9ce06cc5e456d053dbd..6b6fd6c43a1833addfdee89ed26517a527663d75 100644
--- a/chrome/browser/extensions/active_tab_permission_manager.cc
+++ b/chrome/browser/extensions/active_tab_permission_manager.cc
@@ -53,9 +53,10 @@ void ActiveTabPermissionManager::GrantIfRequested(const Extension* extension) {
new_apis.insert(APIPermission::kTab);
URLPatternSet new_hosts;
new_hosts.AddPattern(pattern);
+ scoped_refptr<const PermissionSet> new_permissions =
+ new PermissionSet(new_apis, new_hosts, URLPatternSet());
- extension->UpdateTabSpecificPermissions(
- tab_id_, new PermissionSet(new_apis, new_hosts, URLPatternSet()));
+ extension->UpdateTabSpecificPermissions(tab_id_, new_permissions);
granted_extensions_.Insert(extension);
Send(new ExtensionMsg_UpdateTabSpecificPermissions(GetPageID(),
tab_id_,
« no previous file with comments | « no previous file | chrome/common/extensions/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698