OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 void Initialize(InitParams params) override; | 60 void Initialize(InitParams params) override; |
61 void TriggerRefresh(const ModelTypeSet& types) override; | 61 void TriggerRefresh(const ModelTypeSet& types) override; |
62 void UpdateCredentials(const SyncCredentials& credentials) override; | 62 void UpdateCredentials(const SyncCredentials& credentials) override; |
63 void StartSyncingWithServer() override; | 63 void StartSyncingWithServer() override; |
64 void SetEncryptionPassphrase(const std::string& passphrase, | 64 void SetEncryptionPassphrase(const std::string& passphrase, |
65 bool is_explicit) override; | 65 bool is_explicit) override; |
66 bool SetDecryptionPassphrase(const std::string& passphrase) override | 66 bool SetDecryptionPassphrase(const std::string& passphrase) override |
67 WARN_UNUSED_RESULT; | 67 WARN_UNUSED_RESULT; |
68 void StopSyncingForShutdown() override; | 68 void StopSyncingForShutdown() override; |
69 void Shutdown(ShutdownReason reason) override; | 69 void Shutdown(ShutdownReason reason) override; |
70 ModelTypeSet ConfigureDataTypes( | 70 void ConfigureDataTypes(ConfigureParams params) override; |
71 ConfigureReason reason, | |
72 const DataTypeConfigStateMap& config_state_map, | |
73 const base::Callback<void(ModelTypeSet, ModelTypeSet)>& ready_task, | |
74 const base::Callback<void()>& retry_callback) override; | |
75 void ActivateDirectoryDataType(ModelType type, | 71 void ActivateDirectoryDataType(ModelType type, |
76 ModelSafeGroup group, | 72 ModelSafeGroup group, |
77 ChangeProcessor* change_processor) override; | 73 ChangeProcessor* change_processor) override; |
78 void DeactivateDirectoryDataType(ModelType type) override; | 74 void DeactivateDirectoryDataType(ModelType type) override; |
79 void ActivateNonBlockingDataType(ModelType type, | 75 void ActivateNonBlockingDataType(ModelType type, |
80 std::unique_ptr<ActivationContext>) override; | 76 std::unique_ptr<ActivationContext>) override; |
81 void DeactivateNonBlockingDataType(ModelType type) override; | 77 void DeactivateNonBlockingDataType(ModelType type) override; |
82 void EnableEncryptEverything() override; | 78 void EnableEncryptEverything() override; |
83 UserShare* GetUserShare() const override; | 79 UserShare* GetUserShare() const override; |
84 Status GetDetailedStatus() override; | 80 Status GetDetailedStatus() override; |
(...skipping 17 matching lines...) Expand all Loading... |
102 // InvalidationHandler implementation. | 98 // InvalidationHandler implementation. |
103 void OnInvalidatorStateChange(InvalidatorState state) override; | 99 void OnInvalidatorStateChange(InvalidatorState state) override; |
104 void OnIncomingInvalidation( | 100 void OnIncomingInvalidation( |
105 const ObjectIdInvalidationMap& invalidation_map) override; | 101 const ObjectIdInvalidationMap& invalidation_map) override; |
106 std::string GetOwnerName() const override; | 102 std::string GetOwnerName() const override; |
107 | 103 |
108 protected: | 104 protected: |
109 // The types and functions below are protected so that test | 105 // The types and functions below are protected so that test |
110 // subclasses can use them. | 106 // subclasses can use them. |
111 | 107 |
112 // Request the syncer to reconfigure with the specfied params. | |
113 // Virtual for testing. | |
114 virtual void RequestConfigureSyncer( | |
115 ConfigureReason reason, | |
116 ModelTypeSet to_download, | |
117 const ModelSafeRoutingInfo& routing_info, | |
118 const base::Callback<void(ModelTypeSet, ModelTypeSet)>& ready_task, | |
119 const base::Closure& retry_callback); | |
120 | |
121 // Called when the syncer has finished performing a configuration. | 108 // Called when the syncer has finished performing a configuration. |
122 void FinishConfigureDataTypesOnFrontendLoop( | 109 void FinishConfigureDataTypesOnFrontendLoop( |
123 const ModelTypeSet enabled_types, | 110 const ModelTypeSet enabled_types, |
124 const ModelTypeSet succeeded_configuration_types, | 111 const ModelTypeSet succeeded_configuration_types, |
125 const ModelTypeSet failed_configuration_types, | 112 const ModelTypeSet failed_configuration_types, |
126 const base::Callback<void(ModelTypeSet, ModelTypeSet)>& ready_task); | 113 const base::Callback<void(ModelTypeSet, ModelTypeSet)>& ready_task); |
127 | 114 |
128 // Reports backend initialization success. Includes some objects from sync | 115 // Reports backend initialization success. Includes some objects from sync |
129 // manager initialization to be passed back to the UI thread. | 116 // manager initialization to be passed back to the UI thread. |
130 // | 117 // |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 base::ThreadChecker thread_checker_; | 299 base::ThreadChecker thread_checker_; |
313 | 300 |
314 base::WeakPtrFactory<SyncBackendHostImpl> weak_ptr_factory_; | 301 base::WeakPtrFactory<SyncBackendHostImpl> weak_ptr_factory_; |
315 | 302 |
316 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostImpl); | 303 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostImpl); |
317 }; | 304 }; |
318 | 305 |
319 } // namespace syncer | 306 } // namespace syncer |
320 | 307 |
321 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 308 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
OLD | NEW |