Index: components/password_manager/core/browser/affiliation_backend.h |
diff --git a/components/password_manager/core/browser/affiliation_backend.h b/components/password_manager/core/browser/affiliation_backend.h |
index eea5e3d7a55ecb5850863ce8f1c2b52bc5f50a31..99ac3e21f751686904b611b3aaeda3fb09313f39 100644 |
--- a/components/password_manager/core/browser/affiliation_backend.h |
+++ b/components/password_manager/core/browser/affiliation_backend.h |
@@ -70,18 +70,29 @@ class AffiliationBackend : public FacetManagerHost, |
const base::Time& keep_fresh_until); |
void TrimCache(); |
+ // Used only for testing. |
+ size_t facet_manager_count() { return facet_managers_.size(); } |
+ |
private: |
+ // Retrieves the FacetManager corresponding to |facet_uri|, creating it and |
+ // storing it into |facet_managers_| if it did not exist. |
+ FacetManager* GetOrCreateFacetManager(const FacetURI& facet_uri); |
+ |
// Collects facet URIs that require fetching and issues a network request |
// against the Affiliation API to fetch corresponding affiliation information. |
void SendNetworkRequest(); |
+ // Scheduled by RequestNotificationAtTime() to be called back at times when a |
+ // FacetManager needs to be notified. |
+ void OnSendNotification(const FacetURI& facet_uri); |
+ |
// FacetManagerHost: |
- base::Time GetCurrentTime() override; |
- base::Time ReadLastUpdateTimeFromDatabase(const FacetURI& facet_uri) override; |
bool ReadAffiliationsFromDatabase( |
const FacetURI& facet_uri, |
AffiliatedFacetsWithUpdateTime* affiliations) override; |
void SignalNeedNetworkRequest() override; |
+ void RequestNotificationAtTime(const FacetURI& facet_uri, |
+ base::Time time) override; |
// AffiliationFetcherDelegate: |
void OnFetchSucceeded( |