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

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

Issue 2261723002: Copy PasswordForm in FormSaverImpl::UpdatePreferredLoginState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just rebased Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/form_saver_impl.cc
diff --git a/components/password_manager/core/browser/form_saver_impl.cc b/components/password_manager/core/browser/form_saver_impl.cc
index d45c64d998ac9bc83597c343c141ae80450decf7..970d8f009e6a376390f1ccf797edd6ebbc8b4fe1 100644
--- a/components/password_manager/core/browser/form_saver_impl.cc
+++ b/components/password_manager/core/browser/form_saver_impl.cc
@@ -134,8 +134,9 @@ void FormSaverImpl::UpdatePreferredLoginState() {
if (form->preferred && !form->is_public_suffix_match &&
form->username_value != preferred_username) {
// This wasn't the selected login but it used to be preferred.
- form->preferred = false;
- store_->UpdateLogin(*form);
+ PasswordForm update(*form);
+ update.preferred = false;
+ store_->UpdateLogin(update);
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698