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

Unified Diff: chrome/browser/ui/android/autofill/autofill_popup_view_android.cc

Issue 2627153007: Fix styling of Form-Not-Secure warnings on Android (Closed)
Patch Set: actually set the icon size Created 3 years, 11 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 | components/autofill/android/java/res/values/colors.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/android/autofill/autofill_popup_view_android.cc
diff --git a/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc b/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc
index 6795ac78bb65f28ad16d2cae3c4fc9a4be12fc23..c6d77bca72dcd4bad4a85e4d40783a31e5b4cdc4 100644
--- a/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc
+++ b/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc
@@ -15,6 +15,7 @@
#include "components/autofill/core/browser/popup_item_ids.h"
#include "components/autofill/core/browser/suggestion.h"
#include "components/autofill/core/common/autofill_util.h"
+#include "components/security_state/core/security_state.h"
#include "content/public/browser/android/content_view_core.h"
#include "jni/AutofillPopupBridge_jni.h"
#include "ui/android/view_android.h"
@@ -96,9 +97,15 @@ void AutofillPopupViewAndroid::UpdateBoundsAndRedrawPopup() {
bool is_deletable =
controller_->GetRemovalConfirmationText(i, nullptr, nullptr);
+ // In the Form-Not-Secure experiment, the payment disabled message
+ // is a short message that should be displayed the same as the other
+ // autofill suggestions. If this experiment is not enabled, then the
+ // payment disabled message should be allowed to span multiple
+ // lines.
bool is_label_multiline =
- suggestion.frontend_id ==
- POPUP_ITEM_ID_INSECURE_CONTEXT_PAYMENT_DISABLED_MESSAGE ||
+ (!security_state::IsHttpWarningInFormEnabled() &&
+ suggestion.frontend_id ==
+ POPUP_ITEM_ID_INSECURE_CONTEXT_PAYMENT_DISABLED_MESSAGE) ||
suggestion.frontend_id == POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO;
Java_AutofillPopupBridge_addToAutofillSuggestionArray(
env, data_array, i, value, label, android_icon_id,
« no previous file with comments | « no previous file | components/autofill/android/java/res/values/colors.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698