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

Unified Diff: chrome/browser/ui/android/infobars/permission_infobar.cc

Issue 2250053002: Clean up the PermissionInfoBarDelegate hierarchy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-infobar-remember-decision
Patch Set: Created 4 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/ui/android/infobars/permission_infobar.cc
diff --git a/chrome/browser/ui/android/infobars/permission_infobar.cc b/chrome/browser/ui/android/infobars/permission_infobar.cc
index 3fafa3f5956186529508dca5f06373e3bf18f1d1..fa7f166a1468279709285138c569b5bca16bcbbd 100644
--- a/chrome/browser/ui/android/infobars/permission_infobar.cc
+++ b/chrome/browser/ui/android/infobars/permission_infobar.cc
@@ -21,29 +21,29 @@
using base::android::ScopedJavaLocalRef;
std::unique_ptr<infobars::InfoBar> CreatePermissionInfoBar(
- std::unique_ptr<PermissionInfobarDelegate> delegate) {
+ std::unique_ptr<PermissionInfoBarDelegate> delegate) {
return base::WrapUnique(new PermissionInfoBar(std::move(delegate)));
}
PermissionInfoBar::PermissionInfoBar(
- std::unique_ptr<PermissionInfobarDelegate> delegate)
+ std::unique_ptr<PermissionInfoBarDelegate> delegate)
: ConfirmInfoBar(std::move(delegate)) {}
PermissionInfoBar::~PermissionInfoBar() = default;
-PermissionInfobarDelegate* PermissionInfoBar::GetDelegate() {
- return delegate()->AsPermissionInfobarDelegate();
+PermissionInfoBarDelegate* PermissionInfoBar::GetDelegate() {
+ return delegate()->AsPermissionInfoBarDelegate();
}
ScopedJavaLocalRef<jobject> PermissionInfoBar::CreateRenderInfoBar(
JNIEnv* env) {
ScopedJavaLocalRef<jstring> ok_button_text =
base::android::ConvertUTF16ToJavaString(
- env, GetTextFor(PermissionInfobarDelegate::BUTTON_OK));
+ env, GetTextFor(PermissionInfoBarDelegate::BUTTON_OK));
ScopedJavaLocalRef<jstring> cancel_button_text =
base::android::ConvertUTF16ToJavaString(
- env, GetTextFor(PermissionInfobarDelegate::BUTTON_CANCEL));
- PermissionInfobarDelegate* delegate = GetDelegate();
+ env, GetTextFor(PermissionInfoBarDelegate::BUTTON_CANCEL));
+ PermissionInfoBarDelegate* delegate = GetDelegate();
ScopedJavaLocalRef<jstring> message_text =
base::android::ConvertUTF16ToJavaString(env, delegate->GetMessageText());
ScopedJavaLocalRef<jstring> link_text =
@@ -68,7 +68,7 @@ ScopedJavaLocalRef<jobject> PermissionInfoBar::CreateRenderInfoBar(
void PermissionInfoBar::ProcessButton(int action) {
// Check if the delegate asked us to display a persistence toggle. If so,
// inform it of the toggle state.
- PermissionInfobarDelegate* delegate = GetDelegate();
+ PermissionInfoBarDelegate* delegate = GetDelegate();
if (delegate->ShouldShowPersistenceToggle()) {
delegate->set_persist(Java_PermissionInfoBar_isPersistSwitchOn(
base::android::AttachCurrentThread(), GetJavaInfoBar()));

Powered by Google App Engine
This is Rietveld 408576698