| Index: chrome/browser/browsing_data/autofill_counter.cc
|
| diff --git a/chrome/browser/browsing_data/autofill_counter.cc b/chrome/browser/browsing_data/autofill_counter.cc
|
| index db83e1a995a3c59b268339d5dd01c8731f00e7bf..72e7cd52a852984f9c3188e6569c1ab846870487 100644
|
| --- a/chrome/browser/browsing_data/autofill_counter.cc
|
| +++ b/chrome/browser/browsing_data/autofill_counter.cc
|
| @@ -9,21 +9,23 @@
|
| #include <vector>
|
|
|
| #include "base/memory/scoped_vector.h"
|
| +#include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/web_data_service_factory.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "components/autofill/core/browser/autofill_profile.h"
|
| #include "components/autofill/core/browser/credit_card.h"
|
| #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
|
|
|
| -AutofillCounter::AutofillCounter() : pref_name_(prefs::kDeleteFormData),
|
| - web_data_service_(nullptr),
|
| - suggestions_query_(0),
|
| - credit_cards_query_(0),
|
| - addresses_query_(0),
|
| - num_suggestions_(0),
|
| - num_credit_cards_(0),
|
| - num_addresses_(0) {
|
| -}
|
| +AutofillCounter::AutofillCounter(Profile* profile)
|
| + : BrowsingDataCounter(prefs::kDeleteFormData),
|
| + profile_(profile),
|
| + web_data_service_(nullptr),
|
| + suggestions_query_(0),
|
| + credit_cards_query_(0),
|
| + addresses_query_(0),
|
| + num_suggestions_(0),
|
| + num_credit_cards_(0),
|
| + num_addresses_(0) {}
|
|
|
| AutofillCounter::~AutofillCounter() {
|
| CancelAllRequests();
|
| @@ -31,14 +33,10 @@ AutofillCounter::~AutofillCounter() {
|
|
|
| void AutofillCounter::OnInitialized() {
|
| web_data_service_ = WebDataServiceFactory::GetAutofillWebDataForProfile(
|
| - GetProfile(), ServiceAccessType::EXPLICIT_ACCESS);
|
| + profile_, ServiceAccessType::EXPLICIT_ACCESS);
|
| DCHECK(web_data_service_);
|
| }
|
|
|
| -const std::string& AutofillCounter::GetPrefName() const {
|
| - return pref_name_;
|
| -}
|
| -
|
| void AutofillCounter::SetPeriodStartForTesting(
|
| const base::Time& period_start_for_testing) {
|
| period_start_for_testing_ = period_start_for_testing;
|
|
|