| 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 // Returns false if an error occurred, true otherwise. | 400 // Returns false if an error occurred, true otherwise. |
| 401 virtual bool PurgePartiallySyncedTypes() = 0; | 401 virtual bool PurgePartiallySyncedTypes() = 0; |
| 402 | 402 |
| 403 // Update tokens that we're using in Sync. Email must stay the same. | 403 // Update tokens that we're using in Sync. Email must stay the same. |
| 404 virtual void UpdateCredentials(const SyncCredentials& credentials) = 0; | 404 virtual void UpdateCredentials(const SyncCredentials& credentials) = 0; |
| 405 | 405 |
| 406 // Called when the user disables or enables a sync type. | 406 // Called when the user disables or enables a sync type. |
| 407 virtual void UpdateEnabledTypes( | 407 virtual void UpdateEnabledTypes( |
| 408 const ModelTypeSet& enabled_types) = 0; | 408 const ModelTypeSet& enabled_types) = 0; |
| 409 | 409 |
| 410 // Forwards to the underlying notifier (see SyncNotifier::SetHandler()). |
| 411 virtual void SetInvalidationHandler( |
| 412 const std::string& handler_name, |
| 413 SyncNotifierObserver* handler) = 0; |
| 414 |
| 410 // Forwards to the underlying notifier (see | 415 // Forwards to the underlying notifier (see |
| 411 // SyncNotifier::UpdateRegisteredIds()). | 416 // SyncNotifier::UpdateRegisteredIds()). |
| 412 virtual void UpdateRegisteredInvalidationIds( | 417 virtual void UpdateRegisteredInvalidationIds( |
| 413 SyncNotifierObserver* handler, | 418 const std::string& handler_name, |
| 414 const ObjectIdSet& ids) = 0; | 419 const ObjectIdSet& ids) = 0; |
| 415 | 420 |
| 416 // Put the syncer in normal mode ready to perform nudges and polls. | 421 // Put the syncer in normal mode ready to perform nudges and polls. |
| 417 virtual void StartSyncingNormally( | 422 virtual void StartSyncingNormally( |
| 418 const ModelSafeRoutingInfo& routing_info) = 0; | 423 const ModelSafeRoutingInfo& routing_info) = 0; |
| 419 | 424 |
| 420 // Attempts to re-encrypt encrypted data types using the passphrase provided. | 425 // Attempts to re-encrypt encrypted data types using the passphrase provided. |
| 421 // Notifies observers of the result of the operation via OnPassphraseAccepted | 426 // Notifies observers of the result of the operation via OnPassphraseAccepted |
| 422 // or OnPassphraseRequired, updates the nigori node, and does re-encryption as | 427 // or OnPassphraseRequired, updates the nigori node, and does re-encryption as |
| 423 // appropriate. If an explicit password has been set previously, we drop | 428 // appropriate. If an explicit password has been set previously, we drop |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 virtual bool ReceivedExperiment(Experiments* experiments) = 0; | 527 virtual bool ReceivedExperiment(Experiments* experiments) = 0; |
| 523 | 528 |
| 524 // Uses a read-only transaction to determine if the directory being synced has | 529 // Uses a read-only transaction to determine if the directory being synced has |
| 525 // any remaining unsynced items. May be called on any thread. | 530 // any remaining unsynced items. May be called on any thread. |
| 526 virtual bool HasUnsyncedItems() = 0; | 531 virtual bool HasUnsyncedItems() = 0; |
| 527 }; | 532 }; |
| 528 | 533 |
| 529 } // namespace syncer | 534 } // namespace syncer |
| 530 | 535 |
| 531 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 536 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
| OLD | NEW |