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

Unified Diff: chrome/common/extensions/permissions/permission_set.cc

Issue 15836003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 7 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
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);

Powered by Google App Engine
This is Rietveld 408576698