| 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 7fe246d041f4162db8cad55fa5770e3a6a119e06..b3ba88608efc43483f88a89b3250b3fcb17d99f2 100644
|
| --- a/components/password_manager/core/browser/affiliated_match_helper.h
|
| +++ b/components/password_manager/core/browser/affiliated_match_helper.h
|
| @@ -13,6 +13,7 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/scoped_vector.h"
|
| +#include "base/timer/timer.h"
|
| #include "components/password_manager/core/browser/affiliation_utils.h"
|
| #include "components/password_manager/core/browser/password_store.h"
|
| #include "components/password_manager/core/browser/password_store_consumer.h"
|
| @@ -108,6 +109,10 @@ class AffiliatedMatchHelper : public PasswordStore::Observer,
|
| static const int64 kInitializationDelayOnStartupInSeconds = 8;
|
|
|
| private:
|
| + // Indicates the time at which verifying that affiliation information has been
|
| + // correctly prefetched for dummy Android applications takes place.
|
| + enum class VerificationTiming { ON_STARTUP, PERIODIC };
|
| +
|
| // Reads all autofillable credentials from the password store and starts
|
| // observing the store for future changes.
|
| void DoDeferredInitialization();
|
| @@ -129,6 +134,26 @@ class AffiliatedMatchHelper : public PasswordStore::Observer,
|
| const AffiliatedFacets& results,
|
| bool success);
|
|
|
| + // Called either shortly after startup or periodically in the steady state (as
|
| + // indicated by |timing|) to verify that affiliation information has been
|
| + // correctly prefetched for the dummy Android applications. Will record UMA
|
| + // histograms using a appropriate suffix based on |timing|.
|
| + void VerifyAffiliationsForDummyFacets(VerificationTiming timing);
|
| +
|
| + // Sets up the given |timer| to call VerifyAffiliationsForDummyFacets() with
|
| + // the specified |delay|, with the given |timing| designation.
|
| + void ScheduleVerifyAffiliationsForDummyFacets(base::Timer* timer,
|
| + base::TimeDelta delay,
|
| + VerificationTiming timing);
|
| +
|
| + // Called back by the AffiliationService in response to requesting affiliation
|
| + // information for the dummy Web facets. The |timing| indicates if the check
|
| + // was performed shortly after startup or periodically in the steady state.
|
| + static void OnRetrievedAffiliationResultsForDummyWebFacets(
|
| + VerificationTiming timing,
|
| + const AffiliatedFacets& results,
|
| + bool success);
|
| +
|
| // PasswordStore::Observer:
|
| void OnLoginsChanged(const PasswordStoreChangeList& changes) override;
|
|
|
| @@ -142,6 +167,10 @@ class AffiliatedMatchHelper : public PasswordStore::Observer,
|
| // Being the sole consumer of AffiliationService, |this| owns the service.
|
| scoped_ptr<AffiliationService> affiliation_service_;
|
|
|
| + // Timers used to schedule VerifyAffiliationsPrefetchedForDummyFacets().
|
| + base::OneShotTimer<AffiliatedMatchHelper> on_startup_verification_timer_;
|
| + base::RepeatingTimer<AffiliatedMatchHelper> repeated_verification_timer_;
|
| +
|
| base::WeakPtrFactory<AffiliatedMatchHelper> weak_ptr_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(AffiliatedMatchHelper);
|
|
|