Android: pass AutofillSuggestion to the logger.

BUG=341493
NOTRY=True
NOTREECHECKS=true
R=benm@chromium.org

Review URL: https://codereview.chromium.org/168283003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252037 0039d316-1c4b-4281-b951-d872f2087c98
parent 53a7f44c
...@@ -60,7 +60,7 @@ public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem ...@@ -60,7 +60,7 @@ public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem
* the autofill. * the autofill.
*/ */
public interface AutofillLogger { public interface AutofillLogger {
public void logSuggestionSelected(String fieldName); public void logSuggestionSelected(AutofillSuggestion autofillSuggestion);
} }
private static AutofillLogger sAutofillLogger = null; private static AutofillLogger sAutofillLogger = null;
...@@ -237,7 +237,7 @@ public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem ...@@ -237,7 +237,7 @@ public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem
int listIndex = mSuggestions.indexOf(selectedSuggestion); int listIndex = mSuggestions.indexOf(selectedSuggestion);
assert listIndex > -1; assert listIndex > -1;
if (sAutofillLogger != null) { if (sAutofillLogger != null) {
sAutofillLogger.logSuggestionSelected(selectedSuggestion.mLabel); sAutofillLogger.logSuggestionSelected(selectedSuggestion);
} }
mAutofillCallback.suggestionSelected(listIndex); mAutofillCallback.suggestionSelected(listIndex);
} }
......
...@@ -23,4 +23,16 @@ public class AutofillSuggestion { ...@@ -23,4 +23,16 @@ public class AutofillSuggestion {
mSublabel = label; mSublabel = label;
mUniqueId = uniqueId; mUniqueId = uniqueId;
} }
public String getLabel() {
return mLabel;
}
public String getSublabel() {
return mSublabel;
}
public int getUniqueId() {
return mUniqueId;
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment