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

Issue 492043003: Fill on account select in the password manager (Closed)

Created:
6 years, 4 months ago by jww
Modified:
6 years ago
Reviewers:
Garrett Casto
CC:
chromium-reviews, benquan, browser-components-watch_chromium.org, jam, darin-cc_chromium.org, Dane Wallinga, dyu1, rouslan+autofillwatch_chromium.org, estade+watch_chromium.org, gcasto+watchlist_chromium.org, Ilya Sherman, mkwst+watchlist_chromium.org, palmer
Project:
chromium
Visibility:
Public.

Description

Fill on account select in the password manager This implements, behind a flag, fill on account select in the password manager. When the --enable-fill-on-account-select flag is used (or set in chrome://flags), instead of autofilling on page load, the password manager will mark fields as "autofilled" that it believes it can appropriately autofill, but it will wait until the user has selected those fields manually and chooses the appropriate account before filling them in. There are two main advantages to this approach. The first is that it raises the bar for attackers with XSS's to sites in harvesting passwords. These attackers will not be able to rely on a mere user gesture before the field is filled; the user now must explicitly choose the account before it fills. Secondly, it has the possibility of improving the browsing experience on sites where the password manager fails to fill correctly, as it won't actually fill until the user chooses to do so, so if it tries to fill a wrong field, they user will simply not choose an account. The most basic part of this CL is quite straightforward in that if the flag is enabled, it simply stops, marks the fields as autofilled, and does not actually fill the fields with the credentials. However, there is a more complicated corner case: forms where the username is not editable, but the password field is, such as google.com/accounts after a user has logged in once. For these cases, it was necessary to add additional logic so that the *password* field can be clicked and the credentials can be selected. This requires a new IPC and some new autofill plumbing to change the dropdown menu. BUG=410963

Patch Set 1 #

Total comments: 4

Patch Set 2 : Rebase on ToT #

Patch Set 3 : Fixes from gcasto #

Total comments: 2

Patch Set 4 : Rebase on ToT #

Patch Set 5 : Basic fill-on-select for password fields working #

Patch Set 6 : Rebase on ToT #

Patch Set 7 : Menu on password field working #

Patch Set 8 : Rebase on ToT #

Total comments: 20

Patch Set 9 : Addressed gcasto's comments #

Patch Set 10 : Rebase on ToT #

Patch Set 11 : Re-added check that form contains a username field. #

Total comments: 14

Patch Set 12 : Rebase on ToT #

Patch Set 13 : Address gcasto comments #

Patch Set 14 : Unit tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+293 lines, -47 lines) Patch
M chrome/app/generated_resources.grd View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_popup_controller_impl.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_popup_controller_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +14 lines, -2 lines 0 comments Download
M chrome/renderer/autofill/password_autofill_agent_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +43 lines, -2 lines 0 comments Download
M components/autofill/content/common/autofill_messages.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -6 lines 0 comments Download
M components/autofill/content/renderer/autofill_agent.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M components/autofill/content/renderer/password_autofill_agent.h View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -3 lines 0 comments Download
M components/autofill/content/renderer/password_autofill_agent.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 16 chunks +96 lines, -30 lines 0 comments Download
M components/autofill/core/browser/popup_item_ids.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M components/autofill/core/common/autofill_constants.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M components/autofill/core/common/autofill_switches.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M components/autofill/core/common/autofill_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -0 lines 0 comments Download
M components/autofill_strings.grdp View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M components/password_manager/DEPS View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M components/password_manager/core/browser/password_autofill_manager.h View 1 2 3 4 5 6 7 8 9 2 chunks +11 lines, -1 line 0 comments Download
M components/password_manager/core/browser/password_autofill_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +19 lines, -1 line 0 comments Download
M components/password_manager/core/browser/password_autofill_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +48 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
jww
Hey Garrett. This is an implementation of fill on account select behind a flag. It ...
6 years, 4 months ago (2014-08-24 00:47:38 UTC) #1
Garrett Casto
https://codereview.chromium.org/492043003/diff/1/components/autofill/content/renderer/password_autofill_agent.cc File components/autofill/content/renderer/password_autofill_agent.cc (right): https://codereview.chromium.org/492043003/diff/1/components/autofill/content/renderer/password_autofill_agent.cc#newcode933 components/autofill/content/renderer/password_autofill_agent.cc:933: const int options) { So I think that the ...
6 years, 3 months ago (2014-09-08 21:27:20 UTC) #2
jww
gcasto@, I think I addressed your concerns. Let me know. https://codereview.chromium.org/492043003/diff/1/components/autofill/content/renderer/password_autofill_agent.cc File components/autofill/content/renderer/password_autofill_agent.cc (right): https://codereview.chromium.org/492043003/diff/1/components/autofill/content/renderer/password_autofill_agent.cc#newcode933 ...
6 years, 3 months ago (2014-09-09 01:40:34 UTC) #3
Garrett Casto
Apologies if my previous comments were long winded. It is sometime easy to mistake length ...
6 years, 3 months ago (2014-09-12 19:08:29 UTC) #4
jww
https://codereview.chromium.org/492043003/diff/40001/components/autofill/content/renderer/password_autofill_agent.cc File components/autofill/content/renderer/password_autofill_agent.cc (right): https://codereview.chromium.org/492043003/diff/40001/components/autofill/content/renderer/password_autofill_agent.cc#newcode959 components/autofill/content/renderer/password_autofill_agent.cc:959: } On 2014/09/12 19:08:28, Garrett Casto wrote: > This ...
6 years, 3 months ago (2014-09-15 22:48:00 UTC) #5
Garrett Casto
On 2014/09/15 22:48:00, jww wrote: > https://codereview.chromium.org/492043003/diff/40001/components/autofill/content/renderer/password_autofill_agent.cc > File components/autofill/content/renderer/password_autofill_agent.cc (right): > > https://codereview.chromium.org/492043003/diff/40001/components/autofill/content/renderer/password_autofill_agent.cc#newcode959 > ...
6 years, 3 months ago (2014-09-19 08:41:30 UTC) #6
jww
On 2014/09/19 08:41:30, Garrett Casto wrote: > On 2014/09/15 22:48:00, jww wrote: > > > ...
6 years, 3 months ago (2014-09-19 21:35:13 UTC) #7
jww
Garrett, this implementation I think finally addresses the hidden username case. Can you take a ...
6 years, 1 month ago (2014-11-01 01:25:08 UTC) #8
Garrett Casto
Would you mind adding some screenshots of this UI to the bug? In general it ...
6 years, 1 month ago (2014-11-04 23:35:30 UTC) #9
jww
Thanks, Garrett. Yes, it definitely makes sense to split this CL. I'll finish up here ...
6 years, 1 month ago (2014-11-06 21:28:57 UTC) #10
jww
On 2014/11/06 21:28:57, jww wrote: > Thanks, Garrett. Yes, it definitely makes sense to split ...
6 years, 1 month ago (2014-11-06 21:31:29 UTC) #11
Garrett Casto
https://codereview.chromium.org/492043003/diff/140001/components/autofill/content/renderer/password_autofill_agent.cc File components/autofill/content/renderer/password_autofill_agent.cc (right): https://codereview.chromium.org/492043003/diff/140001/components/autofill/content/renderer/password_autofill_agent.cc#newcode444 components/autofill/content/renderer/password_autofill_agent.cc:444: if (IsElementAutocompletable(username_element)) { On 2014/11/06 21:28:56, jww (vacation until ...
6 years, 1 month ago (2014-11-23 07:49:49 UTC) #12
jww
My two outstanding issues are: * unit tests * splitting the CL in two I'll ...
6 years ago (2014-11-25 02:46:26 UTC) #13
jww
Garrett, I added unit and browser tests. I'll split this CL up soon, although it ...
6 years ago (2014-11-26 01:58:23 UTC) #14
jww
6 years ago (2014-12-01 21:58:46 UTC) #15
On 2014/11/26 01:58:23, jww wrote:
> Garrett, I added unit and browser tests. I'll split this CL up soon, although
it
> would be great to get your opinion on the tests whenever you get a chance.

This CL is officially deprecated in favor of two others that I've split from
this:
   * https://codereview.chromium.org/767353002/ implements the password manager
half
   * https://codereview.chromium.org/773573004/ implements the renderer half

Powered by Google App Engine
This is Rietveld 408576698