| 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..655259489838f14424ae8c148ac2a4f5f37c17c6 100644
|
| --- a/chrome/browser/browsing_data/autofill_counter.cc
|
| +++ b/chrome/browser/browsing_data/autofill_counter.cc
|
| @@ -15,15 +15,16 @@
|
| #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 +32,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;
|
|
|