Revert of sync: Add non-blocking type encryption support (https://codereview.chromium...
commitdc4d0153b235bff62506f5a8a9261e2b66d00a19
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 5 Aug 2014 02:19:35 +0000 (5 02:19 +0000)
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 5 Aug 2014 02:19:35 +0000 (5 02:19 +0000)
treefeb9d172478cd934e4270b899dc4f03091731569
parentf5840b7d3e3aeaa312e0e28ec64705b8537d28d1
Revert of sync: Add non-blocking type encryption support (https://codereview.chromium.org/423193002/)

Reason for revert:
Both LSAN and Valgrind complains about leaks in the tests.

Original issue's description:
> sync: Add non-blocking type encryption support
>
> Introduces the framework for dealing with sync encryption in
> non-blocking types.  Unlike directory sync types, non-blocking type
> encryption only encrypts data before it is sent to the server.
> Encrypting the data on-disk is a separate problem.
>
> Adds code to the ModelTypeSyncWorker so it can access the directory's
> cryptographer (through a CryptographerProvider interface) and use it to
> encrypt entities before it sends them to the server.  If the
> cryptographer is unable to encrypt with the desired key, the worker will
> not commit until the cryptographer returns to a good state.
>
> Adds the concept of a "desired encryption key" to the data type state.
> When the cryptographer key to be used to encrypt a type changes, this
> will be reflected in the data type state.  The ModelTypeSyncProxy is
> responsible for ensuring that all items which have not yet been
> encrypted with this desired key are enqueued for commit.
>
> Makes the ModelTypeSyncWorker, EntityTracker, and ModelTypeSyncProxy
> collaborate on the management of undecryptable (inapplicable) updates.
> The EntityTracker keeps track of their version numbers and content, and
> prevents the committing of new items to the server until the
> inapplicable update has been dealt with.  The ModelTypeSyncProxy is
> responsible for saving inapplicable updates across restarts.
>
> This CL alone is not enough to enable encryption support for
> non-blocking types.  It requires additional code to hook up the
> ModelTypeSyncWorkers to receive cryptographer events.  This will be
> added in a future commit.  In the meantime, this CL includes plenty
> of unit tests to verify the functionality that's being added.
>
> BUG=351005
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287428

TBR=zea@chromium.org,stanisc@chromium.org,rlarocque@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=351005

Review URL: https://codereview.chromium.org/442623002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287433 0039d316-1c4b-4281-b951-d872f2087c98
32 files changed:
components/sync_driver/non_blocking_data_type_controller_unittest.cc
sync/engine/entity_tracker.cc
sync/engine/entity_tracker.h
sync/engine/model_type_entity.cc
sync/engine/model_type_entity.h
sync/engine/model_type_entity_unittest.cc
sync/engine/model_type_sync_proxy.h
sync/engine/model_type_sync_proxy_impl.cc
sync/engine/model_type_sync_proxy_impl.h
sync/engine/model_type_sync_proxy_impl_unittest.cc
sync/engine/model_type_sync_worker_impl.cc
sync/engine/model_type_sync_worker_impl.h
sync/engine/model_type_sync_worker_impl_unittest.cc
sync/internal_api/public/non_blocking_sync_common.h
sync/internal_api/public/sync_context.h
sync/internal_api/public/sync_context_proxy.h
sync/internal_api/public/test/null_sync_context_proxy.h
sync/internal_api/sync_context_proxy_impl.cc
sync/internal_api/sync_context_proxy_impl.h
sync/internal_api/sync_encryption_handler_impl.cc
sync/internal_api/test/null_sync_context_proxy.cc
sync/sessions/model_type_registry.cc
sync/sessions/model_type_registry.h
sync/sessions/model_type_registry_unittest.cc
sync/test/engine/injectable_sync_context_proxy.cc
sync/test/engine/injectable_sync_context_proxy.h
sync/test/engine/mock_model_type_sync_proxy.cc
sync/test/engine/mock_model_type_sync_proxy.h
sync/test/engine/mock_model_type_sync_worker.cc
sync/test/engine/mock_model_type_sync_worker.h
sync/util/cryptographer.cc
sync/util/cryptographer.h