Index: chrome/common/extensions/permissions/permission_set.cc |
diff --git a/chrome/common/extensions/permissions/permission_set.cc b/chrome/common/extensions/permissions/permission_set.cc |
index a6467aaf27b0dbfcebdb034336c53cb84289d410..30253531f3f3855125ef3a848d0d0aed3343800e 100644 |
--- a/chrome/common/extensions/permissions/permission_set.cc |
+++ b/chrome/common/extensions/permissions/permission_set.cc |
@@ -120,8 +120,8 @@ PermissionSet* PermissionSet::CreateDifference( |
const PermissionSet* set1, |
const PermissionSet* set2) { |
scoped_refptr<PermissionSet> empty = new PermissionSet(); |
- const PermissionSet* set1_safe = (set1 == NULL) ? empty : set1; |
- const PermissionSet* set2_safe = (set2 == NULL) ? empty : set2; |
+ const PermissionSet* set1_safe = (set1 == NULL) ? empty.get() : set1; |
+ const PermissionSet* set2_safe = (set2 == NULL) ? empty.get() : set2; |
APIPermissionSet apis; |
APIPermissionSet::Difference(set1_safe->apis(), set2_safe->apis(), &apis); |
@@ -144,8 +144,8 @@ PermissionSet* PermissionSet::CreateIntersection( |
const PermissionSet* set1, |
const PermissionSet* set2) { |
scoped_refptr<PermissionSet> empty = new PermissionSet(); |
- const PermissionSet* set1_safe = (set1 == NULL) ? empty : set1; |
- const PermissionSet* set2_safe = (set2 == NULL) ? empty : set2; |
+ const PermissionSet* set1_safe = (set1 == NULL) ? empty.get() : set1; |
+ const PermissionSet* set2_safe = (set2 == NULL) ? empty.get() : set2; |
APIPermissionSet apis; |
APIPermissionSet::Intersection(set1_safe->apis(), set2_safe->apis(), &apis); |
@@ -168,8 +168,8 @@ PermissionSet* PermissionSet::CreateUnion( |
const PermissionSet* set1, |
const PermissionSet* set2) { |
scoped_refptr<PermissionSet> empty = new PermissionSet(); |
- const PermissionSet* set1_safe = (set1 == NULL) ? empty : set1; |
- const PermissionSet* set2_safe = (set2 == NULL) ? empty : set2; |
+ const PermissionSet* set1_safe = (set1 == NULL) ? empty.get() : set1; |
+ const PermissionSet* set2_safe = (set2 == NULL) ? empty.get() : set2; |
APIPermissionSet apis; |
APIPermissionSet::Union(set1_safe->apis(), set2_safe->apis(), &apis); |