From 69b3b8f04b759b700b78987fd74cd16c081e6d0e Mon Sep 17 00:00:00 2001 From: "zea@chromium.org" Date: Fri, 24 Aug 2012 22:54:19 +0000 Subject: [Sync] Refactor GetEncryptedTypes usage. The cryptographer is now owned by the SyncEncryptionHandlerImpl, and no longer needs any connection to the nigori handler or encrypted types. Those are accessed via the directory, which now has a GetNigoriHandler method. Because of this, we can now clean up the thread safety guarantees in the sync encryption handler impl, enforcing that everything except GetEncryptedTypes (and IsUsingExplicitPassphrase, which will be fixed in a followup patch) are invoked on the syncer thread. This lets us not have to open unnecessary transactions. At the chrome layer, encrypted types are accessed via BaseTransaction:: GetEncryptedTypes(). At the syncer layer, they're accessed via directory:: GetNigoriHandler()->GetEncryptedTypes(BaseTransaction* trans const). BUG=142476,139848 Review URL: https://chromiumcodereview.appspot.com/10844005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153335 0039d316-1c4b-4281-b951-d872f2087c98 --- sync/internal_api/test/test_user_share.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sync/internal_api/test') diff --git a/sync/internal_api/test/test_user_share.cc b/sync/internal_api/test/test_user_share.cc index 21433b1..ef93b18 100644 --- a/sync/internal_api/test/test_user_share.cc +++ b/sync/internal_api/test/test_user_share.cc @@ -39,4 +39,8 @@ UserShare* TestUserShare::user_share() { return user_share_.get(); } +SyncEncryptionHandler* TestUserShare::encryption_handler() { + return dir_maker_->encryption_handler(); +} + } // namespace syncer -- cgit v1.1