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

Issue 2263683002: credentials_to_update should own its PasswordForms (Closed)

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

Description

credentials_to_update should own its PasswordForms Inside PasswordFormManager and FormSaver, the |credentials_to_update| argument is used to pass copies of non-best matches with a modified password, in order to be saved to PasswordStore. Currently, the PasswordForm in |not_best_matches_| is changed directly, and a pointer to it is passed in |credentials_to_update|. However, |not_best_matches_| will need to become constant as its ownership transfers to the coming FormFetcher class, to avoid potential for surprising side-effects when multiple PasswordFormManager change the shared object inside one FormFetcher. This CL makes that possible by changing the element type of |credentials_to_update| from a pointer to a PasswordForm to a PasswordForm itself. That way it is possible to modify just the copy inside |credentials_to_update| and not the original in |not_best_matches_|. The fact that |not_best_matches_| fall out of sync with the PasswordStore at that point does not matter: the current PasswordFormManager is currently saving a PasswordForm, so it will be destroyed soon and will not need |not_best_matches_|. BUG=621355 Committed: https://crrev.com/df4325ec18d2f313f0d36903895c58f294418c58 Cr-Commit-Position: refs/heads/master@{#413436}

Patch Set 1 #

Patch Set 2 : Rebased #

Total comments: 2

Patch Set 3 : Just rebased #

Patch Set 4 : No empty->null #

Messages

Total messages: 17 (11 generated)
vabr (Chromium)
Hi Vasilii, PTAL. Thanks! Vaclav
4 years, 4 months ago (2016-08-19 20:58:42 UTC) #8
vasilii
lgtm https://codereview.chromium.org/2263683002/diff/20001/components/password_manager/core/browser/form_saver_impl.cc File components/password_manager/core/browser/form_saver_impl.cc (right): https://codereview.chromium.org/2263683002/diff/20001/components/password_manager/core/browser/form_saver_impl.cc#newcode104 components/password_manager/core/browser/form_saver_impl.cc:104: credentials_to_update = nullptr; It doesn't seem that something ...
4 years, 3 months ago (2016-08-22 09:20:01 UTC) #9
vabr (Chromium)
Thanks! Vaclav https://codereview.chromium.org/2263683002/diff/20001/components/password_manager/core/browser/form_saver_impl.cc File components/password_manager/core/browser/form_saver_impl.cc (right): https://codereview.chromium.org/2263683002/diff/20001/components/password_manager/core/browser/form_saver_impl.cc#newcode104 components/password_manager/core/browser/form_saver_impl.cc:104: credentials_to_update = nullptr; On 2016/08/22 09:20:01, vasilii ...
4 years, 3 months ago (2016-08-22 12:31:07 UTC) #10
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/2263683002/60001
4 years, 3 months ago (2016-08-22 12:31:40 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 3 months ago (2016-08-22 13:24:18 UTC) #15
commit-bot: I haz the power
4 years, 3 months ago (2016-08-22 13:26:19 UTC) #17
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/df4325ec18d2f313f0d36903895c58f294418c58
Cr-Commit-Position: refs/heads/master@{#413436}

Powered by Google App Engine
This is Rietveld 408576698