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

Unified Diff: components/history/core/browser/history_model_worker.cc

Issue 2489433002: [Sync] Move thread checking into the ModelSafeWorker interface. (Closed)
Patch Set: Fix iOS hopefully. Created 4 years, 1 month 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/history/core/browser/history_model_worker.cc
diff --git a/components/history/core/browser/history_model_worker.cc b/components/history/core/browser/history_model_worker.cc
index 54828f28340223698cc011a0904b690cd52d395c..20ddbe20b890f1d1ccc018d2979cb67339d62f25 100644
--- a/components/history/core/browser/history_model_worker.cc
+++ b/components/history/core/browser/history_model_worker.cc
@@ -124,6 +124,11 @@ syncer::ModelSafeGroup HistoryModelWorker::GetModelSafeGroup() {
return syncer::GROUP_HISTORY;
}
+bool HistoryModelWorker::IsOnModelThread() {
+ // Can't do better without modifying HistoryService.
sky 2016/11/08 18:17:00 As someone not familiar with this function the com
maxbogue 2016/11/08 18:43:23 Improved; let me know if anything is still unclear
+ return true;
+}
+
HistoryModelWorker::~HistoryModelWorker() {
// The base::CancelableTaskTracker class is not thread-safe and must only be
// used from a single thread but the current object may not be destroyed from

Powered by Google App Engine
This is Rietveld 408576698