| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 virtual void AddObserver(Observer* observer) = 0; | 380 virtual void AddObserver(Observer* observer) = 0; |
| 381 | 381 |
| 382 // Remove the given observer. Make sure to call this if the | 382 // Remove the given observer. Make sure to call this if the |
| 383 // Observer is being destroyed so the SyncManager doesn't | 383 // Observer is being destroyed so the SyncManager doesn't |
| 384 // potentially dereference garbage. | 384 // potentially dereference garbage. |
| 385 virtual void RemoveObserver(Observer* observer) = 0; | 385 virtual void RemoveObserver(Observer* observer) = 0; |
| 386 | 386 |
| 387 // Status-related getter. May be called on any thread. | 387 // Status-related getter. May be called on any thread. |
| 388 virtual SyncStatus GetDetailedStatus() const = 0; | 388 virtual SyncStatus GetDetailedStatus() const = 0; |
| 389 | 389 |
| 390 // Extracts the keystore encryption bootstrap token if a keystore key existed. | |
| 391 // Returns true if bootstrap token successfully extracted, false otherwise. | |
| 392 virtual bool GetKeystoreKeyBootstrapToken(std::string* token) = 0; | |
| 393 | |
| 394 // Call periodically from a database-safe thread to persist recent changes | 390 // Call periodically from a database-safe thread to persist recent changes |
| 395 // to the syncapi model. | 391 // to the syncapi model. |
| 396 virtual void SaveChanges() = 0; | 392 virtual void SaveChanges() = 0; |
| 397 | 393 |
| 398 // Initiates shutdown of various components in the sync engine. Must be | 394 // Initiates shutdown of various components in the sync engine. Must be |
| 399 // called from the main thread to allow preempting ongoing tasks on the sync | 395 // called from the main thread to allow preempting ongoing tasks on the sync |
| 400 // loop (that may be blocked on I/O). The semantics of |callback| are the | 396 // loop (that may be blocked on I/O). The semantics of |callback| are the |
| 401 // same as with StartConfigurationMode. If provided and a scheduler / sync | 397 // same as with StartConfigurationMode. If provided and a scheduler / sync |
| 402 // loop exists, it will be invoked from the sync loop by the scheduler to | 398 // loop exists, it will be invoked from the sync loop by the scheduler to |
| 403 // notify that all work has been flushed + cancelled, and it is idle. | 399 // notify that all work has been flushed + cancelled, and it is idle. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 421 // any remaining unsynced items. May be called on any thread. | 417 // any remaining unsynced items. May be called on any thread. |
| 422 virtual bool HasUnsyncedItems() = 0; | 418 virtual bool HasUnsyncedItems() = 0; |
| 423 | 419 |
| 424 // Returns the SyncManager's encryption handler. | 420 // Returns the SyncManager's encryption handler. |
| 425 virtual SyncEncryptionHandler* GetEncryptionHandler() = 0; | 421 virtual SyncEncryptionHandler* GetEncryptionHandler() = 0; |
| 426 }; | 422 }; |
| 427 | 423 |
| 428 } // namespace syncer | 424 } // namespace syncer |
| 429 | 425 |
| 430 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 426 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
| OLD | NEW |