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

Side by Side 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, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_
6 #define COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_ 6 #define COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 virtual base::Closure GetPasswordStateChangedCallback() = 0; 86 virtual base::Closure GetPasswordStateChangedCallback() = 0;
87 87
88 virtual autofill::PersonalDataManager* GetPersonalDataManager() = 0; 88 virtual autofill::PersonalDataManager* GetPersonalDataManager() = 0;
89 virtual BookmarkUndoService* GetBookmarkUndoServiceIfExists() = 0; 89 virtual BookmarkUndoService* GetBookmarkUndoServiceIfExists() = 0;
90 virtual invalidation::InvalidationService* GetInvalidationService() = 0; 90 virtual invalidation::InvalidationService* GetInvalidationService() = 0;
91 virtual scoped_refptr<syncer::ExtensionsActivity> GetExtensionsActivity() = 0; 91 virtual scoped_refptr<syncer::ExtensionsActivity> GetExtensionsActivity() = 0;
92 virtual sync_sessions::SyncSessionsClient* GetSyncSessionsClient() = 0; 92 virtual sync_sessions::SyncSessionsClient* GetSyncSessionsClient() = 0;
93 93
94 // Returns a weak pointer to the syncable service specified by |type|. 94 // Returns a weak pointer to the syncable service specified by |type|.
95 // Weak pointer may be unset if service is already destroyed. 95 // Weak pointer may be unset if service is already destroyed.
96 // Note: Should only be called from the model type thread. 96 // Note: Should only be dereferenced from the model type thread.
97 virtual base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( 97 virtual base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
98 syncer::ModelType type) = 0; 98 syncer::ModelType type) = 0;
99 99
100 // Returns a non-owning pointer to the service specified by |type|. Service 100 // Returns a weak pointer to the ModelTypeService specified by |type|. Weak
101 // lifetime is independent from sync thread therefore pointer should not be 101 // pointer may be unset if service is already destroyed.
102 // retained across tasks. 102 // Note: Should only be dereferenced from the model type thread.
103 // Note: Should only be called from the model type thread. 103 virtual base::WeakPtr<syncer_v2::ModelTypeService> GetModelTypeServiceForType(
104 // Note: should only be called by USS.
105 virtual syncer_v2::ModelTypeService* GetModelTypeServiceForType(
106 syncer::ModelType type) = 0; 104 syncer::ModelType type) = 0;
107 105
108 // Creates and returns a new ModelSafeWorker for the group, or null if one 106 // Creates and returns a new ModelSafeWorker for the group, or null if one
109 // cannot be created. 107 // cannot be created.
110 // TODO(maxbogue): Move this inside SyncApiComponentFactory. 108 // TODO(maxbogue): Move this inside SyncApiComponentFactory.
111 virtual scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup( 109 virtual scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup(
112 syncer::ModelSafeGroup group, 110 syncer::ModelSafeGroup group,
113 syncer::WorkerLoopDestructionObserver* observer) = 0; 111 syncer::WorkerLoopDestructionObserver* observer) = 0;
114 112
115 // Returns the current SyncApiComponentFactory instance. 113 // Returns the current SyncApiComponentFactory instance.
116 virtual SyncApiComponentFactory* GetSyncApiComponentFactory() = 0; 114 virtual SyncApiComponentFactory* GetSyncApiComponentFactory() = 0;
117 115
118 private: 116 private:
119 DISALLOW_COPY_AND_ASSIGN(SyncClient); 117 DISALLOW_COPY_AND_ASSIGN(SyncClient);
120 }; 118 };
121 119
122 } // namespace sync_driver 120 } // namespace sync_driver
123 121
124 #endif // COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_ 122 #endif // COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698