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

Unified Diff: components/browsing_data/core/counters/browsing_data_counter.h

Issue 2867033002: Fix BrowsingDataCounter race condition (Closed)
Patch Set: 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/browsing_data_counter.h
diff --git a/components/browsing_data/core/counters/browsing_data_counter.h b/components/browsing_data/core/counters/browsing_data_counter.h
index d7fbb956dce78eef66fd6c315160d6a2f7b08c23..d7d532ae0346cee91a594c6248d1139a29ba0ab8 100644
--- a/components/browsing_data/core/counters/browsing_data_counter.h
+++ b/components/browsing_data/core/counters/browsing_data_counter.h
@@ -128,7 +128,8 @@ class BrowsingDataCounter {
// Called after the class is initialized by calling |Init|.
virtual void OnInitialized();
- // Count the data.
+ // Count the data. Call ReportResult() when finished. Tasks that are still
+ // running should be cancelled to avoid reporting old results.
virtual void Count() = 0;
// State transition methods.
« no previous file with comments | « chrome/browser/browsing_data/site_data_counter.cc ('k') | components/browsing_data/core/counters/history_counter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698