| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_ENGINE_SYNC_ENGINE_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ |
| 6 #define COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ | 6 #define COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 // Kick off shutdown procedure. Attempts to cut short any long-lived or | 125 // Kick off shutdown procedure. Attempts to cut short any long-lived or |
| 126 // blocking sync thread tasks so that the shutdown on sync thread task that | 126 // blocking sync thread tasks so that the shutdown on sync thread task that |
| 127 // we're about to post won't have to wait very long. | 127 // we're about to post won't have to wait very long. |
| 128 virtual void StopSyncingForShutdown() = 0; | 128 virtual void StopSyncingForShutdown() = 0; |
| 129 | 129 |
| 130 // See the implementation and Core::DoShutdown for details. | 130 // See the implementation and Core::DoShutdown for details. |
| 131 // Must be called *after* StopSyncingForShutdown. | 131 // Must be called *after* StopSyncingForShutdown. |
| 132 virtual void Shutdown(ShutdownReason reason) = 0; | 132 virtual void Shutdown(ShutdownReason reason) = 0; |
| 133 | 133 |
| 134 // Changes the set of data types that are currently being synced. | |
| 135 // The ready_task will be run when configuration is done with the | |
| 136 // set of all types that failed configuration (i.e., if its argument | |
| 137 // is non-empty, then an error was encountered). | |
| 138 // Returns the set of types that are ready to start without needing any | |
| 139 // further sync activity. | |
| 140 // ModelTypeConfigurer implementation. | |
| 141 ModelTypeSet ConfigureDataTypes( | |
| 142 ConfigureReason reason, | |
| 143 const DataTypeConfigStateMap& config_state_map, | |
| 144 const base::Callback<void(ModelTypeSet, ModelTypeSet)>& ready_task, | |
| 145 const base::Callback<void()>& retry_callback) override = 0; | |
| 146 | |
| 147 // Turns on encryption of all present and future sync data. | 134 // Turns on encryption of all present and future sync data. |
| 148 virtual void EnableEncryptEverything() = 0; | 135 virtual void EnableEncryptEverything() = 0; |
| 149 | 136 |
| 150 // Obtain a handle to the UserShare needed for creating transactions. Should | 137 // Obtain a handle to the UserShare needed for creating transactions. Should |
| 151 // not be called before we signal initialization is complete with | 138 // not be called before we signal initialization is complete with |
| 152 // OnBackendInitialized(). | 139 // OnBackendInitialized(). |
| 153 virtual UserShare* GetUserShare() const = 0; | 140 virtual UserShare* GetUserShare() const = 0; |
| 154 | 141 |
| 155 // Called from any thread to obtain current status information in detailed or | 142 // Called from any thread to obtain current status information in detailed or |
| 156 // summarized form. | 143 // summarized form. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // See SyncManager::OnCookieJarChanged. | 198 // See SyncManager::OnCookieJarChanged. |
| 212 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; | 199 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; |
| 213 | 200 |
| 214 private: | 201 private: |
| 215 DISALLOW_COPY_AND_ASSIGN(SyncEngine); | 202 DISALLOW_COPY_AND_ASSIGN(SyncEngine); |
| 216 }; | 203 }; |
| 217 | 204 |
| 218 } // namespace syncer | 205 } // namespace syncer |
| 219 | 206 |
| 220 #endif // COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ | 207 #endif // COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ |
| OLD | NEW |