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

Issue 550563002: [Password Generation] Allow generation when saved credentials aren't valid (Closed)

Created:
6 years, 3 months ago by Garrett Casto
Modified:
6 years, 3 months ago
Reviewers:
engedy
CC:
chromium-reviews, gcasto+watchlist_chromium.org, mkwst+watchlist_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[Password Generation] Allow generation when saved credentials aren't valid We wait to verify that the user hasn't blacklisted a form before offering generation. This fixes a bug where we may exit early due to no credentials being autofillable and not inform the renderer that generation is allowed. BUG=412496 Committed: https://crrev.com/bcc3cf8bdb46c0c9ef2628a89d4d3fba629b2259 Cr-Commit-Position: refs/heads/master@{#294565}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -0 lines) Patch
M components/password_manager/core/browser/password_form_manager.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M components/password_manager/core/browser/password_form_manager_unittest.cc View 1 chunk +21 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
Garrett Casto
6 years, 3 months ago (2014-09-09 20:41:53 UTC) #2
engedy
LGTM -- I have only added 2 comments to the neighboring code, not the actual ...
6 years, 3 months ago (2014-09-10 08:19:29 UTC) #3
Garrett Casto
https://codereview.chromium.org/550563002/diff/1/components/password_manager/core/browser/password_form_manager.cc File components/password_manager/core/browser/password_form_manager.cc (right): https://codereview.chromium.org/550563002/diff/1/components/password_manager/core/browser/password_form_manager.cc#newcode444 components/password_manager/core/browser/password_form_manager.cc:444: if (best_score <= 0) { On 2014/09/10 08:19:29, engedy ...
6 years, 3 months ago (2014-09-12 07:55:48 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/550563002/20001
6 years, 3 months ago (2014-09-12 07:57:06 UTC) #6
commit-bot: I haz the power
Committed patchset #2 (id:20001) as 642ddf6e17e625d4c25e175f75f083b9a6d937a7
6 years, 3 months ago (2014-09-12 09:49:59 UTC) #7
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/bcc3cf8bdb46c0c9ef2628a89d4d3fba629b2259 Cr-Commit-Position: refs/heads/master@{#294565}
6 years, 3 months ago (2014-09-12 09:57:08 UTC) #8
engedy
6 years, 3 months ago (2014-09-15 09:41:46 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/550563002/diff/1/components/password_manager/...
File components/password_manager/core/browser/password_form_manager.cc (right):

https://codereview.chromium.org/550563002/diff/1/components/password_manager/...
components/password_manager/core/browser/password_form_manager.cc:444: if
(best_score <= 0) {
On 2014/09/12 07:55:48, Garrett Casto wrote:
> On 2014/09/10 08:19:29, engedy wrote:
> > While this check may very well implement the correct behavior, it does look
> > fishy: (best_score <= 0) is not equivalent to (best_matches_.empty()),
> although
> > the latter implies the former.
> > 
> > I have only skimmed through the code, but it seems possible that
ScoreResult()
> > returns a score of 0 for some terribly bad PSL-matches, so |best_matches_|
> might
> > have elements even if |best_score| is 0.
> > 
> 
> I don't think that it's possible to have a zero score match, though it doesn't
> look intentional. base::SplitString(..., '/', ...) will always at least return
> the empty string, so there will always be at least a partial 
> origin match. Added a TODO() and I'll address it in a different CL, just in
case
> there is some unintended consequences of this change.
> > I think we should add a comment to clarify this.
> 

Yes, that seems true, but for this reasoning, you needed to know that some other
part of the code will put the preceding slash in the URL, even if it did now
have a path at all (this is permitted by GURL). To me, at least, this was not
obvious. And I think exactly these kind of dependencies are the reason why I
have complained in the first place. :)

I agree think the cleanest is to swap this with the next for loop, and check if
|best_matches_| is empty instead.

Thanks for adding the comment.

Powered by Google App Engine
This is Rietveld 408576698