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

Issue 2261723002: Copy PasswordForm in FormSaverImpl::UpdatePreferredLoginState (Closed)

Created:
4 years, 4 months ago by vabr (Chromium)
Modified:
4 years, 4 months ago
Reviewers:
dvadym
CC:
chromium-reviews, gcasto+watchlist_chromium.org, vabr+watchlistpasswordmanager_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Copy PasswordForm in FormSaverImpl::UpdatePreferredLoginState UpdatePreferredLoginState needs to update PasswordStore with a slightly modified version of some of the forms in PasswordFormManager's |best_matches_|. Currently it does so by modifying |best_matches_| directly, and then updating the PasswordStore. That has the advantage of keeping an up-to-date copy in |best_matches_| without reloading from PasswordStore (and also sparing PasswordForm copies inside UpdatePreferredLoginState. It also has a disadvantage: |best_matches_| cannot be const. That will become a problem once the ownership of |best_matches_| will be transferred from PasswordFormManager to a new class, FormFetcher, shared by multiple PasswordFormManager instances. While it is possible to let all PasswordFormManager instances modify the forms owned by a FormFetcher, that will make the code hard to understand and prone to unexpected side-effects. The advantage seems limited -- at the point UpdatePreferredLoginState is called, the PasswordFormManager is saving a password form, and will be deleted soon. It will not need the |best_matches_|. Once FormFetcher starts owning them, it will need to wait for a refresh from PasswordStore to get them updated. But that's not worse than today, when different PasswordFormManager instances do not share their |best_matches_| at all. BUG=621355 Committed: https://crrev.com/f6c4d75aab7ba327efc8e6e05d414b446fa63ecd Cr-Commit-Position: refs/heads/master@{#413441}

Patch Set 1 #

Patch Set 2 : Just create a copy of the best match to update. #

Patch Set 3 : Just rebased #

Patch Set 4 : Just rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -2 lines) Patch
M components/password_manager/core/browser/form_saver_impl.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 29 (21 generated)
vabr (Chromium)
Hi Vadym, Could you PTAL? Thanks! Vaclav
4 years, 4 months ago (2016-08-19 18:17:30 UTC) #4
vabr (Chromium)
Hi Vadym, I changed the CL after your off-line advice. Feel free to take another ...
4 years, 4 months ago (2016-08-19 18:29:55 UTC) #9
vabr (Chromium)
Just rebased
4 years, 4 months ago (2016-08-22 12:25:22 UTC) #13
vabr (Chromium)
Hi Vadym, A gentle ping on this CL, as it is starting to hold a ...
4 years, 4 months ago (2016-08-22 14:17:07 UTC) #18
dvadym
On 2016/08/22 14:17:07, vabr (Chromium) wrote: > Hi Vadym, > > A gentle ping on ...
4 years, 4 months ago (2016-08-22 14:36:36 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2261723002/60001
4 years, 4 months ago (2016-08-22 14:49:37 UTC) #25
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-08-22 14:54:33 UTC) #27
commit-bot: I haz the power
4 years, 4 months ago (2016-08-22 14:56:50 UTC) #29
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/f6c4d75aab7ba327efc8e6e05d414b446fa63ecd
Cr-Commit-Position: refs/heads/master@{#413441}

Powered by Google App Engine
This is Rietveld 408576698