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

Issue 1314903003: Updating of all entries in PasswordManager of the same credentials on password update (Closed)

Created:
5 years, 3 months ago by dvadym
Modified:
5 years, 2 months ago
CC:
chromium-reviews, vabr+watchlist_chromium.org, browser-components-watch_chromium.org, bondd+autofillwatch_chromium.org, estade+watch_chromium.org, gcasto+watchlist_chromium.org, rouslan+autofillwatch_chromium.org, mkwst+watchlist-passwords_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Updating of all entries in PasswordManager of the same credentials on password update. Credentials are considered to be the same if 1.they on the same or PSL match origin 2.they have the same username and password Also this CL contains refactoring: 1.removing |original_signon_realm| from PasswordForm, that also lead to changes in affiliation staff. 2.Password stores return not changed entries BUG=359315 Committed: https://crrev.com/cb9245959cc84cd107f80421dd2456d794a0752f Cr-Commit-Position: refs/heads/master@{#351539}

Patch Set 1 #

Patch Set 2 : format fix #

Total comments: 7

Patch Set 3 : Comments addressed #

Total comments: 11

Patch Set 4 : Implemented updating all credentials, not only PSL #

Patch Set 5 : Rebase #

Patch Set 6 : Rebase fix #

Patch Set 7 : rebase #

Patch Set 8 : Removed PasswordForm.signon_realm #

Patch Set 9 : Tests fixes #

Patch Set 10 : More tests fixes #

Patch Set 11 : Added tests for PSL credentials update #

Patch Set 12 : Removed strings from progress loader #

Total comments: 24

Patch Set 13 : Rebase #

Patch Set 14 : Comments addressed #

Total comments: 27

Patch Set 15 : Addressed Vasilii comments #

Total comments: 39

Patch Set 16 : Addressed comments #

Patch Set 17 : Addressed Balasz's comments #

Patch Set 18 : Rebase #

Patch Set 19 : tiny fix #

Total comments: 18

Patch Set 20 : bot fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+368 lines, -290 lines) Patch
M chrome/browser/password_manager/native_backend_gnome_x.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/password_manager/native_backend_gnome_x_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/password_manager/native_backend_libsecret.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/password_manager/native_backend_libsecret_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/password_manager/password_store_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +6 lines, -8 lines 0 comments Download
M chrome/browser/password_manager/password_store_mac_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/passwords/manage_passwords_state.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/passwords/manage_passwords_state_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M components/autofill/core/common/password_form.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +5 lines, -20 lines 0 comments Download
M components/autofill/core/common/password_form.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +28 lines, -40 lines 0 comments Download
M components/autofill/core/common/password_form_fill_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +6 lines, -3 lines 0 comments Download
M components/autofill/core/common/password_form_fill_data_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +11 lines, -11 lines 0 comments Download
M components/autofill/core/common/save_password_progress_logger.h View 1 2 3 4 5 6 7 8 9 10 11 14 15 16 1 chunk +0 lines, -1 line 0 comments Download
M components/autofill/core/common/save_password_progress_logger.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +2 lines, -5 lines 0 comments Download
M components/password_manager/core/browser/affiliated_match_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -9 lines 0 comments Download
M components/password_manager/core/browser/affiliated_match_helper.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -14 lines 0 comments Download
M components/password_manager/core/browser/affiliated_match_helper_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +0 lines, -41 lines 0 comments Download
M components/password_manager/core/browser/credential_manager_pending_request_task.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +4 lines, -7 lines 0 comments Download
M components/password_manager/core/browser/login_database.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -13 lines 0 comments Download
M components/password_manager/core/browser/login_database_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +6 lines, -6 lines 0 comments Download
M components/password_manager/core/browser/password_form_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -0 lines 0 comments Download
M components/password_manager/core/browser/password_form_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 14 chunks +57 lines, -31 lines 0 comments Download
M components/password_manager/core/browser/password_form_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 31 chunks +206 lines, -43 lines 0 comments Download
M components/password_manager/core/browser/password_store.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -4 lines 0 comments Download
M components/password_manager/core/browser/password_store_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +7 lines, -11 lines 0 comments Download

Messages

Total messages: 39 (4 generated)
dvadym
Hi Vaclav and Vasilii, Please give your feedback on these changes. Currently I've implemented leaving ...
5 years, 3 months ago (2015-08-27 14:19:24 UTC) #2
vasilii
The big question is when you want to update the PSL password? I think it ...
5 years, 3 months ago (2015-08-27 15:36:25 UTC) #3
vabr (Chromium)
On 2015/08/27 15:36:25, vasilii wrote: > The big question is when you want to update ...
5 years, 3 months ago (2015-08-28 07:18:23 UTC) #4
vasilii
On 2015/08/28 07:18:23, vabr (slow start past holiday) wrote: > On 2015/08/27 15:36:25, vasilii wrote: ...
5 years, 3 months ago (2015-08-28 09:30:14 UTC) #5
dvadym
Thanks Vasilli and Vaclav for comments! Vaclav is right, |best_matches_| doesn't contain any PSL matches ...
5 years, 3 months ago (2015-08-28 09:52:08 UTC) #6
vabr (Chromium)
Thanks Vadym. In general this looks good to me, but below are some more comments. ...
5 years, 3 months ago (2015-08-28 10:47:23 UTC) #7
vasilii
We need the unit tests of course. https://codereview.chromium.org/1314903003/diff/40001/components/password_manager/core/browser/password_form_manager.cc File components/password_manager/core/browser/password_form_manager.cc (right): https://codereview.chromium.org/1314903003/diff/40001/components/password_manager/core/browser/password_form_manager.cc#newcode625 components/password_manager/core/browser/password_form_manager.cc:625: bool password_was_update ...
5 years, 3 months ago (2015-08-28 11:10:48 UTC) #8
dvadym
Sure, tests will be uploaded when general approach is approved by you. https://codereview.chromium.org/1314903003/diff/40001/chrome/browser/password_manager/native_backend_libsecret.cc File chrome/browser/password_manager/native_backend_libsecret.cc ...
5 years, 3 months ago (2015-08-28 11:25:29 UTC) #9
vabr (Chromium)
https://codereview.chromium.org/1314903003/diff/40001/chrome/browser/password_manager/native_backend_libsecret.cc File chrome/browser/password_manager/native_backend_libsecret.cc (left): https://codereview.chromium.org/1314903003/diff/40001/chrome/browser/password_manager/native_backend_libsecret.cc#oldcode619 chrome/browser/password_manager/native_backend_libsecret.cc:619: form->origin = lookup_form->origin; On 2015/08/28 11:25:28, dvadym wrote: > ...
5 years, 3 months ago (2015-08-28 11:38:41 UTC) #10
vasilii
I want to go back to my use case. [user1, facebook.com] is a PSL match. ...
5 years, 3 months ago (2015-08-28 11:38:59 UTC) #11
vabr (Chromium)
On 2015/08/28 11:38:59, vasilii wrote: > I want to go back to my use case. ...
5 years, 3 months ago (2015-08-28 11:48:33 UTC) #12
dvadym
On 2015/08/28 11:48:33, vabr (slow start past holiday) wrote: > On 2015/08/28 11:38:59, vasilii wrote: ...
5 years, 3 months ago (2015-08-28 12:02:25 UTC) #13
vasilii
On 2015/08/28 11:48:33, vabr (slow start past holiday) wrote: > On 2015/08/28 11:38:59, vasilii wrote: ...
5 years, 3 months ago (2015-08-28 13:32:24 UTC) #14
vasilii
I also wonder what happens if there is just one matching credential which was a ...
5 years, 3 months ago (2015-08-28 13:54:39 UTC) #15
vabr (Chromium)
On 2015/08/28 13:54:39, vasilii (OOO til 18.09) wrote: > I also wonder what happens if ...
5 years, 3 months ago (2015-09-11 14:57:57 UTC) #16
dvadym
Hi Vaclav and Vasilii, Could you please have a look at this CL once more? ...
5 years, 3 months ago (2015-09-23 14:28:52 UTC) #17
dvadym
Hi Balasz, Could you please have a look if changes in this CL correctly treat ...
5 years, 3 months ago (2015-09-23 14:31:34 UTC) #19
vabr (Chromium)
LGTM with comments, but I have not looked at the affiliation bits closely. Please let ...
5 years, 3 months ago (2015-09-24 15:17:33 UTC) #20
dvadym
Thanks Vaclav, I've addressed your comments in PatchSet 14. PTAL. https://codereview.chromium.org/1314903003/diff/220001/chrome/browser/password_manager/password_store_mac.cc File chrome/browser/password_manager/password_store_mac.cc (right): https://codereview.chromium.org/1314903003/diff/220001/chrome/browser/password_manager/password_store_mac.cc#newcode482 ...
5 years, 2 months ago (2015-09-25 10:19:53 UTC) #21
dvadym
Hi Vasilii, Could you please have a look at changes in password_store_mac? Best regards, Vadym
5 years, 2 months ago (2015-09-25 10:44:16 UTC) #22
dvadym
Hi Balasz, Could you please review changes in affiliation stuff? Best regards, Vadym
5 years, 2 months ago (2015-09-25 10:44:48 UTC) #23
vasilii
Mostly good. There are some open questions. https://codereview.chromium.org/1314903003/diff/260001/components/autofill/core/common/password_form.h File components/autofill/core/common/password_form.h (right): https://codereview.chromium.org/1314903003/diff/260001/components/autofill/core/common/password_form.h#newcode265 components/autofill/core/common/password_form.h:265: bool is_public_suffix_match; ...
5 years, 2 months ago (2015-09-25 14:16:16 UTC) #24
dvadym
Thanks Vasilii. I've addressed your comments. PTAL. https://codereview.chromium.org/1314903003/diff/260001/components/autofill/core/common/password_form.h File components/autofill/core/common/password_form.h (right): https://codereview.chromium.org/1314903003/diff/260001/components/autofill/core/common/password_form.h#newcode265 components/autofill/core/common/password_form.h:265: bool is_public_suffix_match; ...
5 years, 2 months ago (2015-09-28 13:58:41 UTC) #25
vasilii
A question from password_form_manager.cc is still unanswered. https://codereview.chromium.org/1314903003/diff/260001/components/password_manager/core/browser/login_database.cc File components/password_manager/core/browser/login_database.cc (right): https://codereview.chromium.org/1314903003/diff/260001/components/password_manager/core/browser/login_database.cc#newcode939 components/password_manager/core/browser/login_database.cc:939: if (form.is_public_suffix_match) ...
5 years, 2 months ago (2015-09-29 10:37:34 UTC) #26
dvadym
Sorry, I overlooked that question. PTAL. https://codereview.chromium.org/1314903003/diff/260001/components/password_manager/core/browser/password_form_manager.cc File components/password_manager/core/browser/password_form_manager.cc (right): https://codereview.chromium.org/1314903003/diff/260001/components/password_manager/core/browser/password_form_manager.cc#newcode937 components/password_manager/core/browser/password_form_manager.cc:937: pending_credentials_.signon_realm = provisionally_saved_form_->signon_realm; ...
5 years, 2 months ago (2015-09-29 13:51:41 UTC) #27
vasilii
https://codereview.chromium.org/1314903003/diff/260001/components/password_manager/core/browser/password_form_manager.cc File components/password_manager/core/browser/password_form_manager.cc (right): https://codereview.chromium.org/1314903003/diff/260001/components/password_manager/core/browser/password_form_manager.cc#newcode937 components/password_manager/core/browser/password_form_manager.cc:937: pending_credentials_.signon_realm = provisionally_saved_form_->signon_realm; On 2015/09/29 13:51:40, dvadym wrote: > ...
5 years, 2 months ago (2015-09-29 14:35:22 UTC) #28
dvadym
Thanks Vasilii for comments. I've made changes according to offline discussion. PTAL. https://codereview.chromium.org/1314903003/diff/260001/components/password_manager/core/browser/password_form_manager.cc File components/password_manager/core/browser/password_form_manager.cc ...
5 years, 2 months ago (2015-09-29 15:43:40 UTC) #29
engedy
Looking good, however, I would definitely split this CL into three parts as it touches ...
5 years, 2 months ago (2015-09-29 16:20:46 UTC) #30
vasilii
lgtm OK, my comments are addressed.
5 years, 2 months ago (2015-09-29 16:56:16 UTC) #31
dvadym
Thanks Balasz for review! I've addressed your comments https://codereview.chromium.org/1314903003/diff/280001/components/autofill/core/common/password_form.cc File components/autofill/core/common/password_form.cc (right): https://codereview.chromium.org/1314903003/diff/280001/components/autofill/core/common/password_form.cc#newcode20 components/autofill/core/common/password_form.cc:20: void ...
5 years, 2 months ago (2015-09-29 18:29:36 UTC) #32
engedy
LGTM % comments. Most importantly, w.r.t. |password_overridden|, you are right that this value controls whether ...
5 years, 2 months ago (2015-09-29 19:11:04 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1314903003/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1314903003/380001
5 years, 2 months ago (2015-09-30 09:49:49 UTC) #36
commit-bot: I haz the power
Committed patchset #20 (id:380001)
5 years, 2 months ago (2015-09-30 13:06:49 UTC) #37
commit-bot: I haz the power
Patchset 20 (id:??) landed as https://crrev.com/cb9245959cc84cd107f80421dd2456d794a0752f Cr-Commit-Position: refs/heads/master@{#351539}
5 years, 2 months ago (2015-09-30 13:07:50 UTC) #38
dvadym
5 years, 2 months ago (2015-10-12 09:30:45 UTC) #39
Message was sent while issue was closed.
Thanks Balasz for code review! Your comments were addressed in CL
https://codereview.chromium.org/1401723002

https://codereview.chromium.org/1314903003/diff/360001/components/autofill/co...
File components/autofill/core/common/password_form.cc (right):

https://codereview.chromium.org/1314903003/diff/360001/components/autofill/co...
components/autofill/core/common/password_form.cc:24:
target->SetBoolean("is_public_suffix_match", form.is_public_suffix_match);
On 2015/09/29 19:11:04, engedy wrote:
> nit: Don't forget about |is_affiliated| either.

Done, in the following CL.

https://codereview.chromium.org/1314903003/diff/360001/components/autofill/co...
components/autofill/core/common/password_form.cc:126: is_public_suffix_match ==
form.is_public_suffix_match;
On 2015/09/29 19:11:04, engedy wrote:
> I think we might want to test |is_affiliated| here too.

Done, in the following CL.

https://codereview.chromium.org/1314903003/diff/360001/components/autofill/co...
File components/autofill/core/common/password_form.h (right):

https://codereview.chromium.org/1314903003/diff/360001/components/autofill/co...
components/autofill/core/common/password_form.h:264: // if true this match was
found using public suffix matching.
On 2015/09/29 19:11:04, engedy wrote:
> nit: "If true, " -- so with capital and comma, to be consistent with the
above. 

Done, in the following patch set.

https://codereview.chromium.org/1314903003/diff/360001/components/autofill/co...
components/autofill/core/common/password_form.h:267: // if true this form is
affiliated with Android credentials.
On 2015/09/29 19:11:04, engedy wrote:
> naming nit: |is_affiliation_based_match|
> phrasing nit: If true, this is a credential saved through an Android
> application, and found using affiliation-based match.

Done, in the following patch set.

https://codereview.chromium.org/1314903003/diff/360001/components/autofill/co...
File components/autofill/core/common/password_form_fill_data.cc (right):

https://codereview.chromium.org/1314903003/diff/360001/components/autofill/co...
components/autofill/core/common/password_form_fill_data.cc:70: if
(iter->second->is_public_suffix_match)
On 2015/09/29 19:11:04, engedy wrote:
> I think we need "|| is_affiliated" here too.

Done in the following CL.

https://codereview.chromium.org/1314903003/diff/360001/components/autofill/co...
components/autofill/core/common/password_form_fill_data.cc:83: if
(iter->second->is_public_suffix_match)
On 2015/09/29 19:11:04, engedy wrote:
> I would add it here too just in case, but I don't think will ever have
> other_possible_usernames for Android credentials.

Done in the following CL.

https://codereview.chromium.org/1314903003/diff/360001/components/password_ma...
File components/password_manager/core/browser/password_form_manager.cc (right):

https://codereview.chromium.org/1314903003/diff/360001/components/password_ma...
components/password_manager/core/browser/password_form_manager.cc:526:
(!IsValidAndroidFacetURI(preferred_match_->original_signon_realm) &&
On 2015/09/29 19:11:04, engedy wrote:
> I think this should be just |signon_realm|, and is causing the trybot
failures.

Done.

https://codereview.chromium.org/1314903003/diff/360001/components/password_ma...
components/password_manager/core/browser/password_form_manager.cc:817: // If the
autofilled credentials were a PSL match or Android federated
On 2015/09/29 19:11:04, engedy wrote:
> phrasing suggestion:
> 
> // ... or credentials saved from Android apps, store ... 
> 
> 
> [Note: These are traditional username/password credentials saved through
Android
> apps. Federated credentials (be from apps or websites) should never reach this
> point. (They currently do, but I am working on fixing that. :-))]

Done.

https://codereview.chromium.org/1314903003/diff/360001/components/password_ma...
File components/password_manager/core/browser/password_form_manager_unittest.cc
(right):

https://codereview.chromium.org/1314903003/diff/360001/components/password_ma...
components/password_manager/core/browser/password_form_manager_unittest.cc:216:
psl_saved_match_.signon_realm = "http://m.accounts.google.com";
On 2015/09/29 19:11:04, engedy wrote:
> Note: Usually, signon_realm has a trailing slash. If there are any strange
test
> failures here, expect that to be the cause.

In this file, almost all signon_realm are wihtout "/".

Powered by Google App Engine
This is Rietveld 408576698