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

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

Issue 2652243002: Implement Federated PSL Matches in Native Backends (Closed)
Patch Set: Addressed comments. Created 3 years, 11 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/psl_matching_helper.h
diff --git a/components/password_manager/core/browser/psl_matching_helper.h b/components/password_manager/core/browser/psl_matching_helper.h
index 56b2ac408ea15b01946a2d49fa355b0fb5dbf19f..d5839c54205fc08946a9a4eb9594327b3ce0cbea 100644
--- a/components/password_manager/core/browser/psl_matching_helper.h
+++ b/components/password_manager/core/browser/psl_matching_helper.h
@@ -5,8 +5,10 @@
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PSL_MATCHING_HELPER_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PSL_MATCHING_HELPER_H_
+#include <iosfwd>
#include <string>
+#include "components/password_manager/core/browser/password_store.h"
class GURL;
@@ -23,6 +25,21 @@ enum PSLDomainMatchMetric {
PSL_DOMAIN_MATCH_COUNT
};
+enum class MatchResult {
+ NO_MATCH,
+ EXACT_MATCH,
+ PSL_MATCH,
+ FEDERATED_MATCH,
+ FEDERATED_PSL_MATCH,
+};
+
+// For testing.
+std::ostream& operator<<(std::ostream& out, MatchResult result);
+
+// Returns what type of match applies to |form| and |form_digest|.
+MatchResult GetMatchResult(const autofill::PasswordForm& form,
+ const PasswordStore::FormDigest& form_digest);
+
// Using the public suffix list for matching the origin is only needed for
// websites that do not have a single hostname for entering credentials. It
// would be better for their users if they did, but until then we help them find

Powered by Google App Engine
This is Rietveld 408576698