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

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

Issue 1090163004: Add experiment to exercise AffiliationService with dummy data, plus add related UMA histograms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_copy
Patch Set: Created 5 years, 8 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 7fe246d041f4162db8cad55fa5770e3a6a119e06..cc1aa57dd1dae7210b6ef89a516bbfec2e0071dc 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"
@@ -129,6 +130,10 @@ class AffiliatedMatchHelper : public PasswordStore::Observer,
const AffiliatedFacets& results,
bool success);
+ // Called periodically to verify that affiliation information is correctly
+ // prefetched for dummy Android applications, if the experiment is enabled.
+ void VerifyAffiliationsOfDummyFacetsPrefetched();
+
// PasswordStore::Observer:
void OnLoginsChanged(const PasswordStoreChangeList& changes) override;
@@ -142,6 +147,9 @@ class AffiliatedMatchHelper : public PasswordStore::Observer,
// Being the sole consumer of AffiliationService, |this| owns the service.
scoped_ptr<AffiliationService> affiliation_service_;
+ // Timer to periodically trigger VerifyAffiliationsOfDummyFacetsPrefetched().
+ base::RepeatingTimer<AffiliatedMatchHelper> verify_dummy_prefetch_timer_;
+
base::WeakPtrFactory<AffiliatedMatchHelper> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(AffiliatedMatchHelper);

Powered by Google App Engine
This is Rietveld 408576698