summaryrefslogtreecommitdiffstats
path: root/sync/test/engine/injectable_sync_context_proxy.cc
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-06 20:46:11 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-06 20:46:11 +0000
commit4237bc177e77a9f2408758d6677ea1d9b420ed26 (patch)
tree0d333dbafa011b801eed056c36f2edc8f026c0df /sync/test/engine/injectable_sync_context_proxy.cc
parenta9d7b3812cb2e3cba7b9bdcbf50452171ad9b02e (diff)
downloadchromium_src-4237bc177e77a9f2408758d6677ea1d9b420ed26.zip
chromium_src-4237bc177e77a9f2408758d6677ea1d9b420ed26.tar.gz
chromium_src-4237bc177e77a9f2408758d6677ea1d9b420ed26.tar.bz2
sync: Add non-blocking type encryption (retry)
Fixes some memory leak issues that were present in the first instance of this CL. Original description follows: 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 Review URL: https://codereview.chromium.org/442053002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/test/engine/injectable_sync_context_proxy.cc')
-rw-r--r--sync/test/engine/injectable_sync_context_proxy.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sync/test/engine/injectable_sync_context_proxy.cc b/sync/test/engine/injectable_sync_context_proxy.cc
index 27de880..310a198 100644
--- a/sync/test/engine/injectable_sync_context_proxy.cc
+++ b/sync/test/engine/injectable_sync_context_proxy.cc
@@ -20,6 +20,7 @@ InjectableSyncContextProxy::~InjectableSyncContextProxy() {
void InjectableSyncContextProxy::ConnectTypeToSync(
syncer::ModelType type,
const DataTypeState& data_type_state,
+ const UpdateResponseDataList& response_list,
const base::WeakPtr<syncer::ModelTypeSyncProxyImpl>& type_sync_proxy) {
// This class is allowed to participate in only one connection.
DCHECK(!is_worker_connected_);