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

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

Issue 10837060: Don't show host permission warnings for platform apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
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 e5e655579caf65043cf80412d829464f99ccc9a7..79bccac5ac842d66b27b090019e43a62815fd234 100644
--- a/chrome/browser/extensions/api/permissions/permissions_api.cc
+++ b/chrome/browser/extensions/api/permissions/permissions_api.cc
@@ -201,8 +201,9 @@ bool RequestPermissionsFunction::RunImpl() {
// 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.
- if (auto_confirm_for_tests == PROCEED ||
- requested_permissions_->GetWarningMessages().size() == 0) {
+ bool has_no_warnings = requested_permissions_->GetWarningMessages(
+ GetExtension()->GetType()).size() == 0;
+ if (auto_confirm_for_tests == PROCEED || has_no_warnings) {
InstallUIProceed();
} else if (auto_confirm_for_tests == ABORT) {
// Pretend the user clicked cancel.
« no previous file with comments | « chrome/browser/chromeos/extensions/file_handler_util.h ('k') | chrome/browser/extensions/bundle_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698