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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillListAdapter.java

Issue 15660018: [autofill] Add support for PSL domain matching for password autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments from palmer Created 7 years, 6 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/android/java/src/org/chromium/chrome/browser/autofill/AutofillListAdapter.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillListAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillListAdapter.java
index 123db1a73b782556f1104bf5c62069cab74458c8..9cebe745f970c1da2b9b9a9f4406af617fd353a0 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillListAdapter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillListAdapter.java
@@ -5,6 +5,7 @@
package org.chromium.chrome.browser.autofill;
import android.content.Context;
+import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -34,10 +35,16 @@ public class AutofillListAdapter extends ArrayAdapter<AutofillSuggestion> {
(LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
layout = inflater.inflate(R.layout.autofill_text, null);
}
- TextView nameView = (TextView) layout.findViewById(R.id.autofill_name);
- nameView.setText(getItem(position).mName);
TextView labelView = (TextView) layout.findViewById(R.id.autofill_label);
- labelView.setText(getItem(position).mLabel);
+ labelView.setText(getItem(position).mName);
+ TextView sublabelView = (TextView) layout.findViewById(R.id.autofill_sublabel);
+ CharSequence label = getItem(position).mLabel;
aurimas (slooooooooow) 2013/06/07 23:24:29 Could you also changed this to mSubLabel and the o
nyquist 2013/06/11 03:36:01 Done.
+ if (TextUtils.isEmpty(label)) {
+ sublabelView.setVisibility(View.GONE);
+ } else {
+ sublabelView.setText(label);
+ sublabelView.setVisibility(View.VISIBLE);
+ }
return layout;
}

Powered by Google App Engine
This is Rietveld 408576698