Skip to content

Commit

Permalink
mac: Don't show keychain prompt for password Autofill.
Browse files Browse the repository at this point in the history
Password Autofill is supposed to be a convenience. If it creates a
blocking dialog, it is no longer convenient. The original intention of
password Autofill was that it would only prompt the user after a full
username was typed in. Until that behavior is implemented, never prompt the
user for keychain access.

Effectively, this means that passwords stored by Chrome still work, since
Chrome can access those without a prompt, but passwords stored by Safari,
Firefox, or Chrome Canary will not work. Note that the latest build of Safari
and Firefox don't create keychain items with the relevant tags anyways.

BUG=178358

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283805 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
erikchen@chromium.org committed Jul 17, 2014
1 parent 98ca156 commit 1461644
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions components/password_manager/core/browser/password_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,18 @@ void PasswordManager::CreatePendingLoginManagers(
new PasswordFormManager(this, client_, driver_, *iter, ssl_valid);
pending_login_managers_.push_back(manager);

// Avoid prompting the user for access to a password if they don't have
// password saving enabled.
// Password Autofill is supposed to be a convenience. If it creates a
// blocking dialog, it is no longer convenient. We should only prompt the
// user after a full username has been typed in. Until that behavior is
// implemented, never prompt the user for keychain access.
// Effectively, this means that passwords stored by Chrome still work,
// since Chrome can access those without a prompt, but passwords stored by
// Safari, Firefox, or Chrome Canary will not work. Note that the latest
// build of Safari and Firefox don't create keychain items with the
// relevant tags anyways (7/11/2014).
// http://crbug.com/178358
PasswordStore::AuthorizationPromptPolicy prompt_policy =
*saving_passwords_enabled_ ? PasswordStore::ALLOW_PROMPT
: PasswordStore::DISALLOW_PROMPT;
PasswordStore::DISALLOW_PROMPT;

manager->FetchMatchingLoginsFromPasswordStore(prompt_policy);
}
Expand Down

0 comments on commit 1461644

Please sign in to comment.