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

Unified Diff: components/password_manager/core/browser/password_form_manager.cc

Issue 1297963002: Implemented showing update bubble pop-up on password overriding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments were addressed Created 5 years, 4 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: components/password_manager/core/browser/password_form_manager.cc
diff --git a/components/password_manager/core/browser/password_form_manager.cc b/components/password_manager/core/browser/password_form_manager.cc
index 755e4e1dfd03586b8aecf37c5fc3e1ac7fe29b13..6f9bc151529a4aaeb0da56ecbb6ee1c908dfa9e7 100644
--- a/components/password_manager/core/browser/password_form_manager.cc
+++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -84,6 +84,7 @@ PasswordFormManager::PasswordFormManager(
: std::vector<std::string>()),
is_new_login_(true),
has_generated_password_(false),
+ password_overridden_(false),
password_manager_(password_manager),
preferred_match_(nullptr),
is_ignorable_change_password_form_(false),
@@ -786,15 +787,15 @@ void PasswordFormManager::CreatePendingCredentials() {
if (it != best_matches_.end()) {
// The user signed in with a login we autofilled.
pending_credentials_ = *it->second;
- bool password_changed =
+ password_overridden_ =
pending_credentials_.password_value != password_to_save;
if (IsPendingCredentialsPublicSuffixMatch()) {
// If the autofilled credentials were only a PSL match, store a copy with
// the current origin and signon realm. This ensures that on the next
// visit, a precise match is found.
is_new_login_ = true;
- user_action_ = password_changed ? kUserActionChoosePslMatch
- : kUserActionOverridePassword;
+ user_action_ = password_overridden_ ? kUserActionChoosePslMatch
+ : kUserActionOverridePassword;
// Since this credential will not overwrite a previously saved credential,
// username_value can be updated now.
@@ -833,13 +834,13 @@ void PasswordFormManager::CreatePendingCredentials() {
// This will likely happen infrequently, and the inconvenience put on the
// user by asking them is not significant, so we are fine with asking
// here again.
- if (password_changed) {
+ if (password_overridden_) {
pending_credentials_.original_signon_realm.clear();
DCHECK(!IsPendingCredentialsPublicSuffixMatch());
}
} else { // Not a PSL match.
is_new_login_ = false;
- if (password_changed)
+ if (password_overridden_)
user_action_ = kUserActionOverridePassword;
}
} else if (other_possible_username_action_ ==

Powered by Google App Engine
This is Rietveld 408576698