Chromium Code Reviews| Index: components/password_manager/core/browser/password_store.h |
| diff --git a/components/password_manager/core/browser/password_store.h b/components/password_manager/core/browser/password_store.h |
| index b405e2fa06ddfc52009355b5843429af2fee9b11..1b581a33e988521fe1139828f503c3e4552afd6d 100644 |
| --- a/components/password_manager/core/browser/password_store.h |
| +++ b/components/password_manager/core/browser/password_store.h |
| @@ -182,6 +182,21 @@ class PasswordStore : protected PasswordStoreSync, |
| virtual void GetLogins(const FormDigest& form, |
| PasswordStoreConsumer* consumer); |
| + // Returns 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|. Notifies |consumer| on |
| + // completion. The request will be cancelled if the consumer is destroyed. |
| + // |
| + // WARNING: This is *NOT* PSL (Public Suffix List) matching. The logins |
| + // returned by this method are not safe to be filled into the observed form. |
| + // |
| + // 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". |
| + virtual void GetLoginsForSameOrganizationName( |
|
vasilii
2017/05/24 17:48:38
Why virtual?
engedy
2017/05/24 19:27:12
Uhm, no reason. Removed.
|
| + const std::string& signon_realm, |
| + PasswordStoreConsumer* consumer); |
| + |
| // Gets the complete list of PasswordForms that are not blacklist entries--and |
| // are thus auto-fillable. |consumer| will be notified on completion. |
| // The request will be cancelled if the consumer is destroyed. |
| @@ -374,6 +389,11 @@ class PasswordStore : protected PasswordStoreSync, |
| virtual std::vector<std::unique_ptr<autofill::PasswordForm>> |
| FillMatchingLogins(const FormDigest& form) = 0; |
| + // Finds and returns all organization-name-matching logins, or returns an |
| + // empty list on error. |
| + virtual std::vector<std::unique_ptr<autofill::PasswordForm>> |
| + FillLoginsForSameOrganizationName(const std::string signon_realm) = 0; |
|
vasilii
2017/05/24 17:48:38
const std::string&?
engedy
2017/05/24 19:27:12
Good catch. Fixed. All 13 occurrences.
|
| + |
| // Synchronous implementation for manipulating with statistics. |
| virtual void AddSiteStatsImpl(const InteractionsStats& stats) = 0; |
| virtual void RemoveSiteStatsImpl(const GURL& origin_domain) = 0; |
| @@ -464,6 +484,12 @@ class PasswordStore : protected PasswordStoreSync, |
| const base::Callback<bool(const GURL&)>& origin_filter, |
| const base::Closure& completion); |
| + // Finds all logins organization-name-matching |signon_realm| and notifies the |
| + // consumer. |
| + void GetLoginsForSameOrganizationNameImpl( |
| + const std::string& signon_realm, |
| + std::unique_ptr<GetLoginsRequest> request); |
| + |
| // Finds all non-blacklist PasswordForms, and notifies the consumer. |
| void GetAutofillableLoginsImpl(std::unique_ptr<GetLoginsRequest> request); |