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

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

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.cc
diff --git a/components/password_manager/core/browser/password_store.cc b/components/password_manager/core/browser/password_store.cc
index 3c48a6a8da1f7ed91cc88fcc430f3afaeb29b4b6..4750796439f3f99509af04da3f89f1a8f7dcf81c 100644
--- a/components/password_manager/core/browser/password_store.cc
+++ b/components/password_manager/core/browser/password_store.cc
@@ -265,6 +265,12 @@ void PasswordStore::RemoveSiteStats(const GURL& origin_domain) {
base::Bind(&PasswordStore::RemoveSiteStatsImpl, this, origin_domain));
}
+void PasswordStore::GetAllSiteStats(PasswordStoreConsumer* consumer) {
+ std::unique_ptr<GetLoginsRequest> request(new GetLoginsRequest(consumer));
+ ScheduleTask(base::Bind(&PasswordStore::NotifyAllSiteStats, this,
+ base::Passed(&request)));
+}
+
void PasswordStore::GetSiteStats(const GURL& origin_domain,
PasswordStoreConsumer* consumer) {
std::unique_ptr<GetLoginsRequest> request(new GetLoginsRequest(consumer));
@@ -520,6 +526,11 @@ void PasswordStore::GetBlacklistLoginsWithAffiliatedRealmsImpl(
base::Passed(&obtained_forms), base::Passed(&request)));
}
+void PasswordStore::NotifyAllSiteStats(
+ std::unique_ptr<GetLoginsRequest> request) {
+ request->NotifyWithSiteStatistics(GetAllSiteStatsImpl());
+}
+
void PasswordStore::NotifySiteStats(const GURL& origin_domain,
std::unique_ptr<GetLoginsRequest> request) {
request->NotifyWithSiteStatistics(GetSiteStatsImpl(origin_domain));

Powered by Google App Engine
This is Rietveld 408576698