| 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 5b13a3cb86e2f294dc3ac95555d326abdf738cae..4a357919b33b8e81cbf8c8c2aba1dd3d5c3f4f27 100644
|
| --- a/components/password_manager/core/browser/password_store.cc
|
| +++ b/components/password_manager/core/browser/password_store.cc
|
| @@ -59,6 +59,13 @@ void PasswordStore::GetLoginsRequest::NotifyConsumerWithResults(
|
| consumer_weak_, base::Passed(&results)));
|
| }
|
|
|
| +void PasswordStore::GetLoginsRequest::NotifyWithSiteStatistics(
|
| + scoped_ptr<InteractionsStats> stats) {
|
| + origin_loop_->PostTask(FROM_HERE,
|
| + base::Bind(&PasswordStoreConsumer::OnGetSiteStatistics,
|
| + consumer_weak_, base::Passed(&stats)));
|
| +}
|
| +
|
| PasswordStore::PasswordStore(
|
| scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner,
|
| scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner)
|
| @@ -163,6 +170,22 @@ void PasswordStore::ReportMetrics(const std::string& sync_username,
|
| }
|
| }
|
|
|
| +void PasswordStore::AddSiteStats(const InteractionsStats& stats) {
|
| + ScheduleTask(base::Bind(&PasswordStore::AddSiteStatsImpl, this, stats));
|
| +}
|
| +
|
| +void PasswordStore::RemoveSiteStats(const GURL& origin_domain) {
|
| + ScheduleTask(
|
| + base::Bind(&PasswordStore::RemoveSiteStatsImpl, this, origin_domain));
|
| +}
|
| +
|
| +void PasswordStore::GetSiteStats(const GURL& origin_domain,
|
| + PasswordStoreConsumer* consumer) {
|
| + scoped_ptr<GetLoginsRequest> request(new GetLoginsRequest(consumer));
|
| + ScheduleTask(base::Bind(&PasswordStore::NotifySiteStats, this, origin_domain,
|
| + base::Passed(&request)));
|
| +}
|
| +
|
| void PasswordStore::AddObserver(Observer* observer) {
|
| observers_->AddObserver(observer);
|
| }
|
| @@ -302,6 +325,11 @@ void PasswordStore::RemoveLoginsSyncedBetweenInternal(base::Time delete_begin,
|
| NotifyLoginsChanged(changes);
|
| }
|
|
|
| +void PasswordStore::NotifySiteStats(const GURL& origin_domain,
|
| + scoped_ptr<GetLoginsRequest> request) {
|
| + request->NotifyWithSiteStatistics(GetSiteStatsImpl(origin_domain));
|
| +}
|
| +
|
| void PasswordStore::GetLoginsWithAffiliationsImpl(
|
| const PasswordForm& form,
|
| AuthorizationPromptPolicy prompt_policy,
|
|
|