| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
| 6 #define CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 6 #define CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 505 |
| 506 UserShare* GetUserShare() const; | 506 UserShare* GetUserShare() const; |
| 507 | 507 |
| 508 // Inform the cryptographer of the most recent passphrase and set of encrypted | 508 // Inform the cryptographer of the most recent passphrase and set of encrypted |
| 509 // types (from nigori node), then ensure all data that needs encryption is | 509 // types (from nigori node), then ensure all data that needs encryption is |
| 510 // encrypted with the appropriate passphrase. | 510 // encrypted with the appropriate passphrase. |
| 511 // Note: opens a transaction and can trigger ON_PASSPHRASE_REQUIRED, so must | 511 // Note: opens a transaction and can trigger ON_PASSPHRASE_REQUIRED, so must |
| 512 // only be called after syncapi has been initialized. | 512 // only be called after syncapi has been initialized. |
| 513 void RefreshEncryption(); | 513 void RefreshEncryption(); |
| 514 | 514 |
| 515 // Gets the set of encrypted types from the cryptographer |
| 516 // Note: opens a transaction. |
| 515 syncable::ModelTypeSet GetEncryptedDataTypes() const; | 517 syncable::ModelTypeSet GetEncryptedDataTypes() const; |
| 516 | 518 |
| 519 // Reads the nigori node to determine if any experimental types should be |
| 520 // enabled. |
| 521 // Note: opens a transaction. |
| 522 bool ReceivedExperimentalTypes(syncable::ModelTypeSet* to_add) const; |
| 523 |
| 517 // 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 |
| 518 // any remaining unsynced items. | 525 // any remaining unsynced items. |
| 519 bool HasUnsyncedItems() const; | 526 bool HasUnsyncedItems() const; |
| 520 | 527 |
| 521 // Logs the list of unsynced meta handles. | 528 // Logs the list of unsynced meta handles. |
| 522 void LogUnsyncedItems(int level) const; | 529 void LogUnsyncedItems(int level) const; |
| 523 | 530 |
| 524 // Functions used for testing. | 531 // Functions used for testing. |
| 525 | 532 |
| 526 void TriggerOnNotificationStateChangeForTest( | 533 void TriggerOnNotificationStateChangeForTest( |
| (...skipping 10 matching lines...) Expand all Loading... |
| 537 }; | 544 }; |
| 538 | 545 |
| 539 bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, UserShare* share); | 546 bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, UserShare* share); |
| 540 | 547 |
| 541 // Returns the string representation of a PassphraseRequiredReason value. | 548 // Returns the string representation of a PassphraseRequiredReason value. |
| 542 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); | 549 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); |
| 543 | 550 |
| 544 } // namespace sync_api | 551 } // namespace sync_api |
| 545 | 552 |
| 546 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 553 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
| OLD | NEW |