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

Side by Side Diff: chrome/browser/permissions/grouped_permission_infobar_delegate_android.cc

Issue 2755593002: Remove pointer from PermissionPromptAndroid to InfoBar (Closed)
Patch Set: rebase over 2757483002 Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/permissions/grouped_permission_infobar_delegate_android .h" 5 #include "chrome/browser/permissions/grouped_permission_infobar_delegate_android .h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "chrome/browser/android/android_theme_resources.h" 8 #include "chrome/browser/android/android_theme_resources.h"
9 #include "chrome/browser/infobars/infobar_service.h" 9 #include "chrome/browser/infobars/infobar_service.h"
10 #include "chrome/browser/permissions/permission_prompt_android.h" 10 #include "chrome/browser/permissions/permission_prompt_android.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 base::string16 GroupedPermissionInfoBarDelegate::GetButtonLabel( 120 base::string16 GroupedPermissionInfoBarDelegate::GetButtonLabel(
121 InfoBarButton button) const { 121 InfoBarButton button) const {
122 if (PermissionCount() > 1) { 122 if (PermissionCount() > 1) {
123 return l10n_util::GetStringUTF16((button == BUTTON_OK) ? IDS_APP_OK 123 return l10n_util::GetStringUTF16((button == BUTTON_OK) ? IDS_APP_OK
124 : IDS_APP_CANCEL); 124 : IDS_APP_CANCEL);
125 } 125 }
126 126
127 return l10n_util::GetStringUTF16((button == BUTTON_OK) ? IDS_PERMISSION_ALLOW 127 return l10n_util::GetStringUTF16((button == BUTTON_OK) ? IDS_PERMISSION_ALLOW
128 : IDS_PERMISSION_DENY); 128 : IDS_PERMISSION_DENY);
129 } 129 }
130
131 bool GroupedPermissionInfoBarDelegate::EqualsDelegate(
132 infobars::InfoBarDelegate* delegate) const {
133 // The PermissionRequestManager doesn't create duplicate infobars so a pointer
134 // equality check is sufficient.
135 return this == delegate;
136 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698