| Index: chrome/browser/browsing_data/passwords_counter.cc
|
| diff --git a/chrome/browser/browsing_data/passwords_counter.cc b/chrome/browser/browsing_data/passwords_counter.cc
|
| index 6fc68cbc8f06396b5aab3594ce1a88b36745d213..0ca7eb55d6b8371da9095450f8d24b4d8add0b52 100644
|
| --- a/chrome/browser/browsing_data/passwords_counter.cc
|
| +++ b/chrome/browser/browsing_data/passwords_counter.cc
|
| @@ -7,7 +7,8 @@
|
| #include "chrome/common/pref_names.h"
|
| #include "components/password_manager/core/browser/password_store.h"
|
|
|
| -PasswordsCounter::PasswordsCounter() : pref_name_(prefs::kDeletePasswords) {}
|
| +PasswordsCounter::PasswordsCounter(Profile* profile)
|
| + : BrowsingDataCounter(prefs::kDeletePasswords), profile_(profile) {}
|
|
|
| PasswordsCounter::~PasswordsCounter() {
|
| if (store_)
|
| @@ -16,17 +17,14 @@ PasswordsCounter::~PasswordsCounter() {
|
|
|
| void PasswordsCounter::OnInitialized() {
|
| store_ = PasswordStoreFactory::GetForProfile(
|
| - GetProfile(), ServiceAccessType::EXPLICIT_ACCESS).get();
|
| + profile_, ServiceAccessType::EXPLICIT_ACCESS)
|
| + .get();
|
| if (store_)
|
| store_->AddObserver(this);
|
| else
|
| LOG(ERROR) << "No password store! Cannot count passwords.";
|
| }
|
|
|
| -const std::string& PasswordsCounter::GetPrefName() const {
|
| - return pref_name_;
|
| -}
|
| -
|
| void PasswordsCounter::Count() {
|
| if (!store_) {
|
| ReportResult(0);
|
|
|