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

Unified Diff: components/browsing_data/core/counters/history_counter.cc

Issue 2855623005: Move browsing_data counter sync tests to separate file (Closed)
Patch Set: fixes Created 3 years, 7 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: components/browsing_data/core/counters/history_counter.cc
diff --git a/components/browsing_data/core/counters/history_counter.cc b/components/browsing_data/core/counters/history_counter.cc
index 0061bb1c7ee290b05bab14d3896a6cf630b5b690..fd22f4a7c65daa969be92b72fa9a54aa15c7e4d6 100644
--- a/components/browsing_data/core/counters/history_counter.cc
+++ b/components/browsing_data/core/counters/history_counter.cc
@@ -102,7 +102,6 @@ void HistoryCounter::OnGetLocalHistoryCount(
DCHECK(thread_checker_.CalledOnValidThread());
if (!result.success) {
- LOG(ERROR) << "Failed to count the local history.";
return;
}
@@ -151,17 +150,10 @@ void HistoryCounter::MergeResults() {
if (!local_counting_finished_ || !web_counting_finished_)
return;
- ReportResult(
- base::MakeUnique<HistoryResult>(this, local_result_, has_synced_visits_));
+ ReportResult(base::MakeUnique<HistoryResult>(
+ this, local_result_, history_sync_enabled_, has_synced_visits_));
}
-HistoryCounter::HistoryResult::HistoryResult(const HistoryCounter* source,
- ResultInt value,
- bool has_synced_visits)
- : FinishedResult(source, value), has_synced_visits_(has_synced_visits) {}
-
-HistoryCounter::HistoryResult::~HistoryResult() {}
-
void HistoryCounter::OnStateChanged(syncer::SyncService* sync) {
bool history_sync_enabled_new_state = !!web_history_service_callback_.Run();
@@ -173,4 +165,13 @@ void HistoryCounter::OnStateChanged(syncer::SyncService* sync) {
}
}
+HistoryCounter::HistoryResult::HistoryResult(const HistoryCounter* source,
+ ResultInt value,
+ bool is_sync_enabled,
+ bool has_synced_visits)
+ : SyncResult(source, value, is_sync_enabled),
+ has_synced_visits_(has_synced_visits) {}
+
+HistoryCounter::HistoryResult::~HistoryResult() {}
+
} // namespace browsing_data
« no previous file with comments | « components/browsing_data/core/counters/history_counter.h ('k') | components/browsing_data/core/counters/passwords_counter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698