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 comments in sync_notifier.h). | 410 // Forwards to the underlying notifier (see |
411 virtual void RegisterInvalidationHandler( | 411 // SyncNotifier::UpdateRegisteredIds()). |
412 SyncNotifierObserver* handler) = 0; | |
413 | |
414 // Forwards to the underlying notifier (see comments in sync_notifier.h). | |
415 virtual void UpdateRegisteredInvalidationIds( | 412 virtual void UpdateRegisteredInvalidationIds( |
416 SyncNotifierObserver* handler, | 413 SyncNotifierObserver* handler, |
417 const ObjectIdSet& ids) = 0; | 414 const ObjectIdSet& ids) = 0; |
418 | 415 |
419 // Forwards to the underlying notifier (see comments in sync_notifier.h). | |
420 virtual void UnregisterInvalidationHandler( | |
421 SyncNotifierObserver* handler) = 0; | |
422 | |
423 // Put the syncer in normal mode ready to perform nudges and polls. | 416 // Put the syncer in normal mode ready to perform nudges and polls. |
424 virtual void StartSyncingNormally( | 417 virtual void StartSyncingNormally( |
425 const ModelSafeRoutingInfo& routing_info) = 0; | 418 const ModelSafeRoutingInfo& routing_info) = 0; |
426 | 419 |
427 // Attempts to re-encrypt encrypted data types using the passphrase provided. | 420 // Attempts to re-encrypt encrypted data types using the passphrase provided. |
428 // Notifies observers of the result of the operation via OnPassphraseAccepted | 421 // Notifies observers of the result of the operation via OnPassphraseAccepted |
429 // or OnPassphraseRequired, updates the nigori node, and does re-encryption as | 422 // or OnPassphraseRequired, updates the nigori node, and does re-encryption as |
430 // appropriate. If an explicit password has been set previously, we drop | 423 // appropriate. If an explicit password has been set previously, we drop |
431 // subsequent requests to set a passphrase. If the cryptographer has pending | 424 // subsequent requests to set a passphrase. If the cryptographer has pending |
432 // keys, and a new implicit passphrase is provided, we try decrypting the | 425 // keys, and a new implicit passphrase is provided, we try decrypting the |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 virtual bool ReceivedExperiment(Experiments* experiments) = 0; | 522 virtual bool ReceivedExperiment(Experiments* experiments) = 0; |
530 | 523 |
531 // Uses a read-only transaction to determine if the directory being synced has | 524 // Uses a read-only transaction to determine if the directory being synced has |
532 // any remaining unsynced items. May be called on any thread. | 525 // any remaining unsynced items. May be called on any thread. |
533 virtual bool HasUnsyncedItems() = 0; | 526 virtual bool HasUnsyncedItems() = 0; |
534 }; | 527 }; |
535 | 528 |
536 } // namespace syncer | 529 } // namespace syncer |
537 | 530 |
538 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 531 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
OLD | NEW |