Index: sync/internal_api/sync_encryption_handler_impl.h |
diff --git a/sync/internal_api/sync_encryption_handler_impl.h b/sync/internal_api/sync_encryption_handler_impl.h |
index 79f43f2f237ac2c02d1c264a99e0c19653c03aaa..4e466f1ed7f42ee777908b5454d61755d61506e6 100644 |
--- a/sync/internal_api/sync_encryption_handler_impl.h |
+++ b/sync/internal_api/sync_encryption_handler_impl.h |
@@ -88,6 +88,11 @@ class SYNC_EXPORT_PRIVATE SyncEncryptionHandlerImpl |
base::Time migration_time() const; |
base::Time custom_passphrase_time() const; |
+ // Restore a saved nigori obtained from OnLocalSetPassphraseEncryption. |
+ // |
+ // Writes the nigori to the Directory and updates the Cryptographer. |
+ void RestoreNigori(const SyncEncryptionHandler::NigoriState& nigori_state); |
+ |
private: |
friend class SyncEncryptionHandlerImplTest; |
FRIEND_TEST_ALL_PREFIXES(SyncEncryptionHandlerImplTest, |
@@ -139,7 +144,10 @@ class SYNC_EXPORT_PRIVATE SyncEncryptionHandlerImpl |
// Iterate over all encrypted types ensuring each entry is properly encrypted. |
void ReEncryptEverything(WriteTransaction* trans); |
- // Apply a nigori update. Updates internal and cryptographer state. |
+ // Updates internal and cryptographer state. |
+ // |
+ // Assumes |nigori| is already present in the Sync Directory. |
+ // |
// Returns true on success, false if |nigori| was incompatible, and the |
// nigori node must be corrected. |
// Note: must be called from within a transaction. |
@@ -261,6 +269,9 @@ class SYNC_EXPORT_PRIVATE SyncEncryptionHandlerImpl |
// (if known). Else return base::Time(). |
base::Time GetExplicitPassphraseTime() const; |
+ // Notify observers when a custom passphrase is set by this device. |
+ void NotifyObserversOfLocalCustomPassphrase(WriteTransaction* trans); |
+ |
base::ThreadChecker thread_checker_; |
base::ObserverList<SyncEncryptionHandler::Observer> observers_; |