diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-24 22:54:19 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-24 22:54:19 +0000 |
commit | 69b3b8f04b759b700b78987fd74cd16c081e6d0e (patch) | |
tree | 03942e40523cfc328b66d77186e0d1552c19beb9 /sync/internal_api/test | |
parent | c09eeea393004f61f55adca9aeda4aa387cee903 (diff) | |
download | chromium_src-69b3b8f04b759b700b78987fd74cd16c081e6d0e.zip chromium_src-69b3b8f04b759b700b78987fd74cd16c081e6d0e.tar.gz chromium_src-69b3b8f04b759b700b78987fd74cd16c081e6d0e.tar.bz2 |
[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
Diffstat (limited to 'sync/internal_api/test')
-rw-r--r-- | sync/internal_api/test/test_user_share.cc | 4 |
1 files changed, 4 insertions, 0 deletions
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 |