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

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

Issue 2695233004: Implement PasswordStore::GetAllStats (Closed)
Patch Set: Add Mac Implementations Created 3 years, 10 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/password_store.h
diff --git a/components/password_manager/core/browser/password_store.h b/components/password_manager/core/browser/password_store.h
index c6151cc93e1f380faf3b56c5344ba82da2472c76..dd34afc9bc94e4b4bec0294c74d500f5bb61394d 100644
--- a/components/password_manager/core/browser/password_store.h
+++ b/components/password_manager/core/browser/password_store.h
@@ -208,6 +208,10 @@ class PasswordStore : protected PasswordStoreSync,
// Removes the statistics for |origin_domain|.
void RemoveSiteStats(const GURL& origin_domain);
+ // Retrieves the statistics for all sites and notifies |consumer| on
+ // completion. The request will be cancelled if the consumer is destroyed.
+ void GetAllSiteStats(PasswordStoreConsumer* consumer);
+
// Retrieves the statistics for |origin_domain| and notifies |consumer| on
// completion. The request will be cancelled if the consumer is destroyed.
void GetSiteStats(const GURL& origin_domain, PasswordStoreConsumer* consumer);
@@ -358,6 +362,7 @@ class PasswordStore : protected PasswordStoreSync,
// Synchronous implementation for manipulating with statistics.
virtual void AddSiteStatsImpl(const InteractionsStats& stats) = 0;
virtual void RemoveSiteStatsImpl(const GURL& origin_domain) = 0;
+ virtual std::vector<InteractionsStats> GetAllSiteStatsImpl() = 0;
virtual std::vector<InteractionsStats> GetSiteStatsImpl(
const GURL& origin_domain) = 0;
@@ -454,6 +459,9 @@ class PasswordStore : protected PasswordStoreSync,
void GetBlacklistLoginsWithAffiliatedRealmsImpl(
std::unique_ptr<GetLoginsRequest> request);
+ // Notifies |request| about the stats for all sites.
+ void NotifyAllSiteStats(std::unique_ptr<GetLoginsRequest> request);
+
// Notifies |request| about the stats for |origin_domain|.
void NotifySiteStats(const GURL& origin_domain,
std::unique_ptr<GetLoginsRequest> request);

Powered by Google App Engine
This is Rietveld 408576698