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

Unified Diff: components/sync/driver/sync_client.h

Issue 2254083002: [Sync] Convert NonBlockingDataTypeController to be single-thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dt
Patch Set: Update DeviceInfoService. Created 4 years, 4 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/sync_client.h
diff --git a/components/sync/driver/sync_client.h b/components/sync/driver/sync_client.h
index 141b2a764c112e5d80fee43b22fb91f6b5ee8415..48a8611b116e488660ac3c196efa81fbd4d7bc8a 100644
--- a/components/sync/driver/sync_client.h
+++ b/components/sync/driver/sync_client.h
@@ -93,16 +93,14 @@ class SyncClient {
// Returns a weak pointer to the syncable service specified by |type|.
// Weak pointer may be unset if service is already destroyed.
- // Note: Should only be called from the model type thread.
+ // Note: Should only be dereferenced from the model type thread.
virtual base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
syncer::ModelType type) = 0;
- // Returns a non-owning pointer to the service specified by |type|. Service
- // lifetime is independent from sync thread therefore pointer should not be
- // retained across tasks.
- // Note: Should only be called from the model type thread.
- // Note: should only be called by USS.
- virtual syncer_v2::ModelTypeService* GetModelTypeServiceForType(
+ // Returns a weak pointer to the ModelTypeService specified by |type|. Weak
+ // pointer may be unset if service is already destroyed.
+ // Note: Should only be dereferenced from the model type thread.
+ virtual base::WeakPtr<syncer_v2::ModelTypeService> GetModelTypeServiceForType(
syncer::ModelType type) = 0;
// Creates and returns a new ModelSafeWorker for the group, or null if one

Powered by Google App Engine
This is Rietveld 408576698