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

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

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
« no previous file with comments | « components/browsing_data/core/counters/browsing_data_counter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6fcb1c17ea94ec4a88a6225c190ccf4e7fd2ce78..0061bb1c7ee290b05bab14d3896a6cf630b5b690 100644
--- a/components/browsing_data/core/counters/history_counter.cc
+++ b/components/browsing_data/core/counters/history_counter.cc
@@ -55,6 +55,8 @@ void HistoryCounter::Count() {
// Reset the state.
cancelable_task_tracker_.TryCancelAll();
web_history_request_.reset();
+ weak_ptr_factory_.InvalidateWeakPtrs();
+
has_synced_visits_ = false;
// Count the locally stored items.
« no previous file with comments | « components/browsing_data/core/counters/browsing_data_counter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698