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

Unified Diff: components/password_manager/core/browser/password_form_manager.h

Issue 2306513002: Reland "Filter out credentials with non-matching schemes" (Closed)
Patch Set: Restructured + more tests Created 4 years, 3 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
Index: components/password_manager/core/browser/password_form_manager.h
diff --git a/components/password_manager/core/browser/password_form_manager.h b/components/password_manager/core/browser/password_form_manager.h
index be2ebad7542bc453284ba7db9d851b6111f6ffa3..3be0c7045191919175933bafe5f1e3fc3e80671d 100644
--- a/components/password_manager/core/browser/password_form_manager.h
+++ b/components/password_manager/core/browser/password_form_manager.h
@@ -333,6 +333,10 @@ class PasswordFormManager : public PasswordStoreConsumer,
// Trigger filling of HTTP auth dialog and update |manager_action_|.
void ProcessLoginPrompt();
+ // Given all non-blacklisted |matches|, computes their score and populates
+ // |best_matches_|, |preferred_match_| and |non_best_matches_| accordingly.
+ void ScoreMatches(const std::vector<const autofill::PasswordForm*>& matches);
+
// FormFetcher::Consumer:
void ProcessMatches(
const std::vector<const autofill::PasswordForm*>& non_federated,
@@ -348,7 +352,10 @@ class PasswordFormManager : public PasswordStoreConsumer,
// against the observed_form_.
uint32_t ScoreResult(const autofill::PasswordForm& candidate) const;
- // For the blacklisted |form| returns true iff it blacklists |observed_form_|.
+ // Returns true iff |form| is a non-blacklisted match for |observed_form_|.
+ bool IsMatch(const autofill::PasswordForm& form) const;
+
+ // Returns true iff |form| blacklists |observed_form_|.
bool IsBlacklistMatch(const autofill::PasswordForm& form) const;
// Helper for Save in the case there is at least one match for the pending

Powered by Google App Engine
This is Rietveld 408576698