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 SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 221 |
222 // We are no longer permitted to communicate with the server. Sync should | 222 // We are no longer permitted to communicate with the server. Sync should |
223 // be disabled and state cleaned up at once. This can happen for a number | 223 // be disabled and state cleaned up at once. This can happen for a number |
224 // of reasons, e.g. swapping from a test instance to production, or a | 224 // of reasons, e.g. swapping from a test instance to production, or a |
225 // global stop syncing operation has wiped the store. | 225 // global stop syncing operation has wiped the store. |
226 virtual void OnStopSyncingPermanently() = 0; | 226 virtual void OnStopSyncingPermanently() = 0; |
227 | 227 |
228 virtual void OnActionableError( | 228 virtual void OnActionableError( |
229 const SyncProtocolError& sync_protocol_error) = 0; | 229 const SyncProtocolError& sync_protocol_error) = 0; |
230 | 230 |
| 231 virtual void OnMigrationRequested(ModelTypeSet types) = 0; |
| 232 |
231 protected: | 233 protected: |
232 virtual ~Observer(); | 234 virtual ~Observer(); |
233 }; | 235 }; |
234 | 236 |
235 SyncManager(); | 237 SyncManager(); |
236 virtual ~SyncManager(); | 238 virtual ~SyncManager(); |
237 | 239 |
238 // Initialize the sync manager. |database_location| specifies the path of | 240 // Initialize the sync manager. |database_location| specifies the path of |
239 // the directory in which to locate a sqlite repository storing the syncer | 241 // the directory in which to locate a sqlite repository storing the syncer |
240 // backend state. Initialization will open the database, or create it if it | 242 // backend state. Initialization will open the database, or create it if it |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 // Returns the SyncManager's encryption handler. | 377 // Returns the SyncManager's encryption handler. |
376 virtual SyncEncryptionHandler* GetEncryptionHandler() = 0; | 378 virtual SyncEncryptionHandler* GetEncryptionHandler() = 0; |
377 | 379 |
378 // Ask the SyncManager to fetch updates for the given types. | 380 // Ask the SyncManager to fetch updates for the given types. |
379 virtual void RefreshTypes(ModelTypeSet types) = 0; | 381 virtual void RefreshTypes(ModelTypeSet types) = 0; |
380 }; | 382 }; |
381 | 383 |
382 } // namespace syncer | 384 } // namespace syncer |
383 | 385 |
384 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 386 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
OLD | NEW |