Index: components/password_manager/core/browser/login_database.h |
diff --git a/components/password_manager/core/browser/login_database.h b/components/password_manager/core/browser/login_database.h |
index c6cf73dc8341f2de75d19f16ba6df4d024d5a83e..ed53b3a8e08d3ba3c6ff4434564af18d4c1dd9e0 100644 |
--- a/components/password_manager/core/browser/login_database.h |
+++ b/components/password_manager/core/browser/login_database.h |
@@ -91,6 +91,18 @@ class LoginDatabase { |
std::vector<std::unique_ptr<autofill::PasswordForm>>* forms) |
const WARN_UNUSED_RESULT; |
+ // Retrieves all stored credentials with SCHEME_HTTP that have a realm whose |
+ // organization-identifying name -- that is, the first domain name label below |
+ // the effective TLD -- matches that of |signon_realm|. Return value indicates |
+ // a successful query (but potentially no results). |
+ // |
+ // For example, the organization-identifying name of "https://foo.example.org" |
+ // is `example`, and logins will be returned for "http://bar.example.co.uk", |
+ // but not for "http://notexample.com" or "https://example.foo.com". |
+ bool GetLoginsForSameOrganizationName( |
+ const std::string& signon_realm, |
+ std::vector<std::unique_ptr<autofill::PasswordForm>>* forms) const; |
+ |
// Gets all logins created from |begin| onwards (inclusive) and before |end|. |
// You may use a null Time value to do an unbounded search in either |
// direction. |
@@ -224,6 +236,7 @@ class LoginDatabase { |
std::string get_statement_psl_; |
std::string get_statement_federated_; |
std::string get_statement_psl_federated_; |
+ std::string get_same_organization_name_logins_statement_; |
std::string created_statement_; |
std::string synced_statement_; |
std::string blacklisted_statement_; |