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

Unified Diff: chrome/browser/permissions/permission_update_infobar_delegate_android.cc

Issue 2807093002: Fix the Update Permissions infobar for geolocation. (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/permissions/permission_update_infobar_delegate_android.cc
diff --git a/chrome/browser/permissions/permission_update_infobar_delegate_android.cc b/chrome/browser/permissions/permission_update_infobar_delegate_android.cc
index 9161e3aa100ff4a3abd1bf1e0fff23a7659324b7..8224a9187c8851c96cf896c065000749af00df31 100644
--- a/chrome/browser/permissions/permission_update_infobar_delegate_android.cc
+++ b/chrome/browser/permissions/permission_update_infobar_delegate_android.cc
@@ -47,11 +47,13 @@ infobars::InfoBar* PermissionUpdateInfoBarDelegate::Create(
if (missing_permission_count > 1)
continue;
+ bool has_all_permissions = true;
for (auto it = permissions.begin() + previous_size; it != permissions.end();
++it) {
- if (window_android->HasPermission(*it))
- continue;
+ has_all_permissions &= window_android->HasPermission(*it);
+ }
+ if (!has_all_permissions) {
missing_permission_count++;
if (missing_permission_count > 1) {
message_id = IDS_INFOBAR_MISSING_MULTIPLE_PERMISSIONS_TEXT;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698