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

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

Issue 999073002: Integrate serving affiliation-based matches into the PasswordStore. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aff_integration
Patch Set: Reduce scope of CL, test utils are fixed in a separate CL. Created 5 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 e48e9771ee885e7a778448ed1962b1fab3a3e2e4..6fa76545f5036f9c567a280f342fb7064e3d7e13 100644
--- a/components/password_manager/core/browser/affiliated_match_helper.h
+++ b/components/password_manager/core/browser/affiliated_match_helper.h
@@ -52,7 +52,8 @@ class AffiliatedMatchHelper : public PasswordStore::Observer,
typedef base::Callback<void(const std::vector<std::string>&)>
AffiliatedRealmsCallback;
- // The |password_store| must outlive |this|.
+ // 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,
scoped_ptr<AffiliationService> affiliation_service);
~AffiliatedMatchHelper() override;
@@ -63,7 +64,7 @@ class AffiliatedMatchHelper : public PasswordStore::Observer,
// Retrieves realms of Android applications affiliated with the realm of the
// |observed_form| if it is web-based. Otherwise, yields the empty list. The
// |result_callback| will be invoked in both cases, on the same thread.
- void GetAffiliatedAndroidRealms(
+ virtual void GetAffiliatedAndroidRealms(
const autofill::PasswordForm& observed_form,
const AffiliatedRealmsCallback& result_callback);
@@ -106,7 +107,7 @@ class AffiliatedMatchHelper : public PasswordStore::Observer,
void OnGetPasswordStoreResults(
ScopedVector<autofill::PasswordForm> results) override;
- PasswordStore* password_store_;
+ PasswordStore* const password_store_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_for_waiting_;
// Being the sole consumer of AffiliationService, |this| owns the service.
« no previous file with comments | « chrome/common/chrome_constants.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