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

Unified Diff: chrome/browser/extensions/api/permissions/permissions_api.cc

Issue 501263002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/extensions/api/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just in case Created 6 years, 4 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/browser/extensions/api/permissions/permissions_api.cc
diff --git a/chrome/browser/extensions/api/permissions/permissions_api.cc b/chrome/browser/extensions/api/permissions/permissions_api.cc
index 2856418baccd9f19ad3360a4b914884cdaab314b..0f23d4c5209464b42d62675d67aca68561f4c511 100644
--- a/chrome/browser/extensions/api/permissions/permissions_api.cc
+++ b/chrome/browser/extensions/api/permissions/permissions_api.cc
@@ -99,7 +99,7 @@ bool PermissionsRemoveFunction::RunSync() {
scoped_refptr<const PermissionSet> required =
PermissionsParser::GetRequiredPermissions(extension());
scoped_refptr<PermissionSet> intersection(
- PermissionSet::CreateIntersection(permissions.get(), required));
+ PermissionSet::CreateIntersection(permissions.get(), required.get()));
if (!intersection->IsEmpty()) {
error_ = kCantRemoveRequiredPermissionsError;
return false;
@@ -175,7 +175,7 @@ bool PermissionsRequestFunction::RunAsync() {
// The requested permissions must be defined as optional in the manifest.
if (!PermissionsParser::GetOptionalPermissions(extension())
- ->Contains(*requested_permissions_)) {
+ ->Contains(*requested_permissions_.get())) {
Jeffrey Yasskin 2014/08/26 01:14:16 You shouldn't need to add a .get() to something th
dcheng 2014/08/26 01:26:00 scoped_refptr doesn't implement operator*, for bet
error_ = kNotInOptionalPermissionsError;
return false;
}
@@ -202,10 +202,10 @@ bool PermissionsRequestFunction::RunAsync() {
// We don't need to show the prompt if there are no new warnings, or if
// we're skipping the confirmation UI. All extension types but INTERNAL
// are allowed to silently increase their permission level.
- bool has_no_warnings =
- PermissionMessageProvider::Get()
- ->GetWarningMessages(requested_permissions_, extension()->GetType())
- .empty();
+ bool has_no_warnings = PermissionMessageProvider::Get()
+ ->GetWarningMessages(requested_permissions_.get(),
+ extension()->GetType())
+ .empty();
if (auto_confirm_for_tests == PROCEED || has_no_warnings ||
extension_->location() == Manifest::COMPONENT) {
InstallUIProceed();

Powered by Google App Engine
This is Rietveld 408576698