| OLD | NEW |
| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // Returns a weak pointer to the ModelTypeSyncBridge specified by |type|. Weak | 97 // Returns a weak pointer to the ModelTypeSyncBridge specified by |type|. Weak |
| 98 // pointer may be unset if service is already destroyed. | 98 // pointer may be unset if service is already destroyed. |
| 99 // Note: Should only be dereferenced from the model type thread. | 99 // Note: Should only be dereferenced from the model type thread. |
| 100 virtual base::WeakPtr<ModelTypeSyncBridge> GetSyncBridgeForModelType( | 100 virtual base::WeakPtr<ModelTypeSyncBridge> GetSyncBridgeForModelType( |
| 101 ModelType type) = 0; | 101 ModelType type) = 0; |
| 102 | 102 |
| 103 // Creates and returns a new ModelSafeWorker for the group, or null if one | 103 // Creates and returns a new ModelSafeWorker for the group, or null if one |
| 104 // cannot be created. | 104 // cannot be created. |
| 105 // TODO(maxbogue): Move this inside SyncApiComponentFactory. | 105 // TODO(maxbogue): Move this inside SyncApiComponentFactory. |
| 106 virtual scoped_refptr<ModelSafeWorker> CreateModelWorkerForGroup( | 106 virtual scoped_refptr<ModelSafeWorker> CreateModelWorkerForGroup( |
| 107 ModelSafeGroup group, | 107 ModelSafeGroup group) = 0; |
| 108 WorkerLoopDestructionObserver* observer) = 0; | |
| 109 | 108 |
| 110 // Returns the current SyncApiComponentFactory instance. | 109 // Returns the current SyncApiComponentFactory instance. |
| 111 virtual SyncApiComponentFactory* GetSyncApiComponentFactory() = 0; | 110 virtual SyncApiComponentFactory* GetSyncApiComponentFactory() = 0; |
| 112 | 111 |
| 113 private: | 112 private: |
| 114 DISALLOW_COPY_AND_ASSIGN(SyncClient); | 113 DISALLOW_COPY_AND_ASSIGN(SyncClient); |
| 115 }; | 114 }; |
| 116 | 115 |
| 117 } // namespace syncer | 116 } // namespace syncer |
| 118 | 117 |
| 119 #endif // COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_ | 118 #endif // COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_ |
| OLD | NEW |