| 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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 // this was created on, which is the sync loop), as sync is effectively | 492 // this was created on, which is the sync loop), as sync is effectively |
| 493 // stopped. | 493 // stopped. |
| 494 virtual void StopSyncingForShutdown(const base::Closure& callback) = 0; | 494 virtual void StopSyncingForShutdown(const base::Closure& callback) = 0; |
| 495 | 495 |
| 496 // Issue a final SaveChanges, and close sqlite handles. | 496 // Issue a final SaveChanges, and close sqlite handles. |
| 497 virtual void ShutdownOnSyncThread() = 0; | 497 virtual void ShutdownOnSyncThread() = 0; |
| 498 | 498 |
| 499 // May be called from any thread. | 499 // May be called from any thread. |
| 500 virtual UserShare* GetUserShare() = 0; | 500 virtual UserShare* GetUserShare() = 0; |
| 501 | 501 |
| 502 // Inform the cryptographer of the most recent passphrase and set of | 502 virtual void InitialProcessMetadata(const std::string& chrome_version, |
| 503 // encrypted types (from nigori node), then ensure all data that | 503 const base::Closure& done_callback) = 0; |
| 504 // needs encryption is encrypted with the appropriate passphrase. | |
| 505 // | |
| 506 // May trigger OnPassphraseRequired(). Otherwise, it will trigger | |
| 507 // OnEncryptedTypesChanged() if necessary (see comments for | |
| 508 // OnEncryptedTypesChanged()), and then OnEncryptionComplete(). | |
| 509 // | |
| 510 // Also updates or adds device information to the nigori node. | |
| 511 // | |
| 512 // Note: opens a transaction, so must only be called after syncapi | |
| 513 // has been initialized. | |
| 514 virtual void RefreshNigori(const std::string& chrome_version, | |
| 515 const base::Closure& done_callback) = 0; | |
| 516 | 504 |
| 517 // Enable encryption of all sync data. Once enabled, it can never be | 505 // Enable encryption of all sync data. Once enabled, it can never be |
| 518 // disabled without clearing the server data. | 506 // disabled without clearing the server data. |
| 519 // | 507 // |
| 520 // This will trigger OnEncryptedTypesChanged() if necessary (see | 508 // This will trigger OnEncryptedTypesChanged() if necessary (see |
| 521 // comments for OnEncryptedTypesChanged()). It then may trigger | 509 // comments for OnEncryptedTypesChanged()). It then may trigger |
| 522 // OnPassphraseRequired(), but otherwise it will trigger | 510 // OnPassphraseRequired(), but otherwise it will trigger |
| 523 // OnEncryptionComplete(). | 511 // OnEncryptionComplete(). |
| 524 virtual void EnableEncryptEverything() = 0; | 512 virtual void EnableEncryptEverything() = 0; |
| 525 | 513 |
| 526 // Reads the nigori node to determine if any experimental features should | 514 // Reads the nigori node to determine if any experimental features should |
| 527 // be enabled. | 515 // be enabled. |
| 528 // Note: opens a transaction. May be called on any thread. | 516 // Note: opens a transaction. May be called on any thread. |
| 529 virtual bool ReceivedExperiment(Experiments* experiments) = 0; | 517 virtual bool ReceivedExperiment(Experiments* experiments) = 0; |
| 530 | 518 |
| 531 // Uses a read-only transaction to determine if the directory being synced has | 519 // Uses a read-only transaction to determine if the directory being synced has |
| 532 // any remaining unsynced items. May be called on any thread. | 520 // any remaining unsynced items. May be called on any thread. |
| 533 virtual bool HasUnsyncedItems() = 0; | 521 virtual bool HasUnsyncedItems() = 0; |
| 534 }; | 522 }; |
| 535 | 523 |
| 536 } // namespace syncer | 524 } // namespace syncer |
| 537 | 525 |
| 538 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 526 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
| OLD | NEW |