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

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

Issue 2899083004: Implement PasswordStore::GetLoginsForSameOrganizationName. (Closed)
Patch Set: Rebase. Created 3 years, 7 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/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_;
« no previous file with comments | « chrome/browser/password_manager/password_store_x.cc ('k') | components/password_manager/core/browser/login_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698