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

Unified Diff: components/sync/driver/directory_data_type_controller.cc

Issue 2769113002: [Sync] Stop accessing BrowserContextKeyedServiceFactory on non-UI thread. (Closed)
Patch Set: Rebase and removing dependent patch set. Created 3 years, 9 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/sync/driver/directory_data_type_controller.cc
diff --git a/components/sync/driver/directory_data_type_controller.cc b/components/sync/driver/directory_data_type_controller.cc
index a03ee3dd17c026ff9ef07a88933505883b7e9674..8ae2d034ebec9ed875cdfde2e50dce28f6527079 100644
--- a/components/sync/driver/directory_data_type_controller.cc
+++ b/components/sync/driver/directory_data_type_controller.cc
@@ -62,6 +62,7 @@ void DirectoryDataTypeController::DeactivateDataType(
void DirectoryDataTypeController::GetAllNodes(
const AllNodesCallback& callback) {
+ DCHECK(CalledOnValidThread());
std::unique_ptr<base::ListValue> node_list = GetAllNodesForTypeFromDirectory(
type(), sync_client_->GetSyncService()->GetUserShare()->directory.get());
callback.Run(type(), std::move(node_list));
@@ -69,6 +70,7 @@ void DirectoryDataTypeController::GetAllNodes(
void DirectoryDataTypeController::GetStatusCounters(
const StatusCountersCallback& callback) {
+ DCHECK(CalledOnValidThread());
std::vector<int> num_entries_by_type(syncer::MODEL_TYPE_COUNT, 0);
std::vector<int> num_to_delete_entries_by_type(syncer::MODEL_TYPE_COUNT, 0);
sync_client_->GetSyncService()
« no previous file with comments | « components/sync/driver/directory_data_type_controller.h ('k') | components/sync/driver/fake_generic_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698