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

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

Issue 1615653005: [Password manager] Human readable origins for Android credentials on chrome://settings/passwords (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Inlined the variable androidUriSuffix Created 4 years, 9 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/affiliated_match_helper.h
diff --git a/components/password_manager/core/browser/affiliated_match_helper.h b/components/password_manager/core/browser/affiliated_match_helper.h
index a13e9ea2e76624f515c6ff0b637ccdc3a51da83c..bde81a841feb85cfaeb51a25fc534718c2c3268e 100644
--- a/components/password_manager/core/browser/affiliated_match_helper.h
+++ b/components/password_manager/core/browser/affiliated_match_helper.h
@@ -54,6 +54,9 @@ class AffiliatedMatchHelper : public PasswordStore::Observer,
typedef base::Callback<void(const std::vector<std::string>&)>
AffiliatedRealmsCallback;
+ typedef base::Callback<void(ScopedVector<autofill::PasswordForm>)>
+ PasswordFormsCallback;
+
// The |password_store| must outlive |this|. Both arguments must be non-NULL,
// except in tests which do not Initialize() the object.
AffiliatedMatchHelper(PasswordStore* password_store,
@@ -81,6 +84,15 @@ class AffiliatedMatchHelper : public PasswordStore::Observer,
const autofill::PasswordForm& android_form,
const AffiliatedRealmsCallback& result_callback);
+ // Retrieves realms of web sites affiliated with the Android credentials in
+ // |forms|, sets |affiliated_web_realm| of forms, and invokes
+ // |result_callback|.
+ // NOTE: This will not issue an on-demand network request. If a request to
+ // cache fails, no web realm will be injected into corresponding form.
+ virtual void InjectAffiliatedWebRealms(
+ ScopedVector<autofill::PasswordForm> forms,
+ const PasswordFormsCallback& result_callback);
+
// Removes cached affiliation data that is no longer needed.
void TrimAffiliationCache();
@@ -125,6 +137,14 @@ class AffiliatedMatchHelper : public PasswordStore::Observer,
const AffiliatedFacets& results,
bool success);
+ // Called back by AffiliationService to supply the list of facets affiliated
+ // with the Android credential in |form|. Sets |form->affiliated_web_realm|,
+ // if |success| is true and |results| is non-empty. Invokes |barrier_closure|.
+ void CompleteInjectAffiliatedWebRealm(autofill::PasswordForm* form,
+ base::Closure barrier_closure,
+ const AffiliatedFacets& results,
+ bool success);
+
// PasswordStore::Observer:
void OnLoginsChanged(const PasswordStoreChangeList& changes) override;
« no previous file with comments | « components/autofill/core/common/password_form.cc ('k') | components/password_manager/core/browser/affiliated_match_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698