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

Unified Diff: chrome/browser/browsing_data/autofill_counter.cc

Issue 2084903002: Moved BrowsingDataCounter and part of BrowsingDataCounterUtils to components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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: 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;
« no previous file with comments | « chrome/browser/browsing_data/autofill_counter.h ('k') | chrome/browser/browsing_data/autofill_counter_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698