OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_ | 5 #ifndef SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_ |
6 #define SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_ | 6 #define SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 // Sets the set of enabled types. | 57 // Sets the set of enabled types. |
58 void SetEnabledDirectoryTypes(const ModelSafeRoutingInfo& routing_info); | 58 void SetEnabledDirectoryTypes(const ModelSafeRoutingInfo& routing_info); |
59 | 59 |
60 // Enables an off-thread type for syncing. Connects the given proxy | 60 // Enables an off-thread type for syncing. Connects the given proxy |
61 // and its task_runner to the newly created worker. | 61 // and its task_runner to the newly created worker. |
62 // | 62 // |
63 // Expects that the proxy's ModelType is not currently enabled. | 63 // Expects that the proxy's ModelType is not currently enabled. |
64 void ConnectSyncTypeToWorker( | 64 void ConnectSyncTypeToWorker( |
65 syncer::ModelType type, | 65 syncer::ModelType type, |
66 const syncer_v2::DataTypeState& data_type_state, | 66 scoped_ptr<syncer_v2::ActivationContext> activation_context) override; |
67 const syncer_v2::UpdateResponseDataList& saved_pending_updates, | |
68 const scoped_refptr<base::SequencedTaskRunner>& type_task_runner, | |
69 const base::WeakPtr<syncer_v2::ModelTypeProcessor>& type_processor) | |
70 override; | |
71 | 67 |
72 // Disables the syncing of an off-thread type. | 68 // Disables the syncing of an off-thread type. |
73 // | 69 // |
74 // Expects that the type is currently enabled. | 70 // Expects that the type is currently enabled. |
75 // Deletes the worker associated with the type. | 71 // Deletes the worker associated with the type. |
76 void DisconnectSyncWorker(syncer::ModelType type) override; | 72 void DisconnectSyncWorker(syncer::ModelType type) override; |
77 | 73 |
78 // Implementation of SyncEncryptionHandler::Observer. | 74 // Implementation of SyncEncryptionHandler::Observer. |
79 void OnPassphraseRequired( | 75 void OnPassphraseRequired( |
80 PassphraseRequiredReason reason, | 76 PassphraseRequiredReason reason, |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 base::ObserverList<TypeDebugInfoObserver> type_debug_info_observers_; | 156 base::ObserverList<TypeDebugInfoObserver> type_debug_info_observers_; |
161 | 157 |
162 base::WeakPtrFactory<ModelTypeRegistry> weak_ptr_factory_; | 158 base::WeakPtrFactory<ModelTypeRegistry> weak_ptr_factory_; |
163 | 159 |
164 DISALLOW_COPY_AND_ASSIGN(ModelTypeRegistry); | 160 DISALLOW_COPY_AND_ASSIGN(ModelTypeRegistry); |
165 }; | 161 }; |
166 | 162 |
167 } // namespace syncer | 163 } // namespace syncer |
168 | 164 |
169 #endif // SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_ | 165 #endif // SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_ |
OLD | NEW |