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

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

Issue 1342093003: Decouple the browsing data counters initialization and start. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added Restart() to tests as well. Created 5 years, 3 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/browsing_data_counter.cc
diff --git a/chrome/browser/browsing_data/browsing_data_counter.cc b/chrome/browser/browsing_data/browsing_data_counter.cc
index 15ae15e5451ee62272f43edf28c9442439923778..7464bc8973fdfe0d119b2189df2b9f6d3aef1c22 100644
--- a/chrome/browser/browsing_data/browsing_data_counter.cc
+++ b/chrome/browser/browsing_data/browsing_data_counter.cc
@@ -22,17 +22,16 @@ void BrowsingDataCounter::Init(
pref_.Init(
GetPrefName(),
profile_->GetPrefs(),
- base::Bind(&BrowsingDataCounter::RestartCounting,
+ base::Bind(&BrowsingDataCounter::Restart,
base::Unretained(this)));
period_.Init(
prefs::kDeleteTimePeriod,
profile_->GetPrefs(),
- base::Bind(&BrowsingDataCounter::RestartCounting,
+ base::Bind(&BrowsingDataCounter::Restart,
base::Unretained(this)));
initialized_ = true;
OnInitialized();
- RestartCounting();
}
Profile* BrowsingDataCounter::GetProfile() const {
@@ -47,7 +46,7 @@ base::Time BrowsingDataCounter::GetPeriodStart() {
static_cast<BrowsingDataRemover::TimePeriod>(*period_));
}
-void BrowsingDataCounter::RestartCounting() {
+void BrowsingDataCounter::Restart() {
DCHECK(initialized_);
// If this data type was unchecked for deletion, we do not need to count it.
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_counter.h ('k') | chrome/browser/browsing_data/passwords_counter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698