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

Unified Diff: components/autofill/core/browser/password_generator.cc

Issue 1192403003: Avoid checking of VerifyPassword() 2 times when generated password is proper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/password_generator.cc
diff --git a/components/autofill/core/browser/password_generator.cc b/components/autofill/core/browser/password_generator.cc
index 36964ad1ebd0931a291d8404c82dd06dbd664ed8..6fd092b81289613127ea3b3127b386b0a566c5b1 100644
--- a/components/autofill/core/browser/password_generator.cc
+++ b/components/autofill/core/browser/password_generator.cc
@@ -94,7 +94,7 @@ std::string PasswordGenerator::Generate() const {
gen_pron_pass(password, unused_hypenated_password,
password_length_, password_length_, mode);
if (VerifyPassword(password))
- break;
+ return std::string(password);
}
// If the password still isn't conforming after a few iterations, force it
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698