Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,8 @@ public class AutocompleteBridge implements PasswordManager.Bridge, AutofillManag
private LoginSavePrompt mLoginSavePrompt;
private LoginSelectPrompt mLoginSelectPrompt;

private boolean showLoginSelectPrompt;

public void setListener(PasswordManager.Listener listener) {
mPasswordManagerListener = listener;
}
Expand All @@ -973,7 +975,11 @@ public boolean isAutocompleteEnabled(Context context) {

@Override
public boolean isAutoFillEnabled(Context context) {
return SettingsStore.getInstance(context).isAutoFillEnabled();
// Chromium doesn't provide an autofill option.
// Instead, it provides a login selection prompt that let users decide whether to autofill the saved password or not.
// We'll only show this prompt if users enable autofill.
showLoginSelectPrompt = SettingsStore.getInstance(context).isAutoFillEnabled();
return true;
Comment thread
svillar marked this conversation as resolved.
}

@Override
Expand Down Expand Up @@ -1011,6 +1017,10 @@ public boolean saveOrUpdatePassword(PasswordForm form) {

@Override
public boolean onLoginSelect(PasswordForm[] forms) {
if (!showLoginSelectPrompt) {
return false;
}

dismiss();
assert mPasswordManagerListener != null;

Expand Down Expand Up @@ -1038,6 +1048,10 @@ public boolean onLoginSelect(PasswordForm[] forms) {

@Override
public boolean onLoginSelect(String[] username) {
if (!showLoginSelectPrompt) {
return false;
}

dismiss();
assert mAutofillManagerListener != null;

Expand Down