Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Issue 452283003: sync: Finish non-blocking type encryption support (Closed)

Created:
6 years, 4 months ago by rlarocque
Modified:
6 years, 4 months ago
Reviewers:
stanisc, Nicolas Zea
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, zea+watch_chromium.org, maniscalco+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

sync: Finish non-blocking type encryption support Undoes some previous work towards encryption support. That approach suffered from some subtle deadlock issues that could not be easily worked around. The new approach involves less sharing and less locks. Gives the ModelTypeSyncWorker its own copy of the Cryptographer. By passing around copies, it no longer needs to worry about acquiring locks in order to access the Directory's cryptographer. This required a rewrite of some changes to the way the ModelTypeSyncWorker detects the current encryption state. Most notably, its Cryptographer is NULL if encryption is not enabled for its model type. Makes the ModelTypeSyncRegistry responsible for observing changes emitted by the SyncEncryptionHandler and forwarding them to the ModelTypeSyncWorkers. It should receive callbacks from the SyncEncryptionHandler during startup, so it does not need to cache or query any new data. Removes the CryptographerProviders. Since the ModelTypeSyncWorker no longer need to access the directory's cryptographer, it's no longer necessary. BUG=351005 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290067

Patch Set 1 #

Total comments: 4

Patch Set 2 : Changes from stansic's review #

Total comments: 16

Patch Set 3 : Rebase #

Patch Set 4 : Responses to zea's review #

Patch Set 5 : GN updates #

Patch Set 6 : More cryptographer testing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+323 lines, -395 lines) Patch
M chrome/browser/sync/profile_sync_service.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M sync/BUILD.gn View 1 2 3 4 2 chunks +0 lines, -6 lines 0 comments Download
D sync/engine/cryptographer_provider.h View 1 chunk +0 lines, -64 lines 0 comments Download
D sync/engine/cryptographer_provider.cc View 1 chunk +0 lines, -42 lines 0 comments Download
D sync/engine/directory_cryptographer_provider.h View 1 chunk +0 lines, -51 lines 0 comments Download
D sync/engine/directory_cryptographer_provider.cc View 1 chunk +0 lines, -38 lines 0 comments Download
M sync/engine/model_type_entity.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M sync/engine/model_type_sync_proxy_impl.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M sync/engine/model_type_sync_worker_impl.h View 6 chunks +12 lines, -13 lines 0 comments Download
M sync/engine/model_type_sync_worker_impl.cc View 1 2 3 16 chunks +62 lines, -61 lines 0 comments Download
M sync/engine/model_type_sync_worker_impl_unittest.cc View 1 2 3 10 chunks +71 lines, -24 lines 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M sync/protocol/proto_value_conversions.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M sync/sessions/model_type_registry.h View 1 2 3 5 chunks +29 lines, -4 lines 0 comments Download
M sync/sessions/model_type_registry.cc View 1 2 3 4 chunks +51 lines, -3 lines 0 comments Download
M sync/sync.gyp View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M sync/sync_tests.gypi View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
D sync/test/engine/simple_cryptographer_provider.h View 1 chunk +0 lines, -44 lines 0 comments Download
D sync/test/engine/simple_cryptographer_provider.cc View 1 chunk +0 lines, -35 lines 0 comments Download
M sync/util/cryptographer.h View 2 chunks +3 lines, -1 line 0 comments Download
M sync/util/cryptographer.cc View 1 chunk +18 lines, -0 lines 0 comments Download
M sync/util/cryptographer_unittest.cc View 1 2 3 4 5 1 chunk +63 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
rlarocque
Sorry for the last minute changes. The design docs for this feature had originally intended ...
6 years, 4 months ago (2014-08-08 22:23:07 UTC) #1
stanisc
Mostly looks good, but I wonder why each model type has to have its own ...
6 years, 4 months ago (2014-08-11 21:05:42 UTC) #2
rlarocque
On 2014/08/11 21:05:42, stanisc wrote: > Mostly looks good, but I wonder why each model ...
6 years, 4 months ago (2014-08-11 21:50:14 UTC) #3
rlarocque
https://codereview.chromium.org/452283003/diff/1/sync/engine/model_type_sync_worker_impl.cc File sync/engine/model_type_sync_worker_impl.cc (right): https://codereview.chromium.org/452283003/diff/1/sync/engine/model_type_sync_worker_impl.cc#newcode393 sync/engine/model_type_sync_worker_impl.cc:393: cryptographer_->GetDefaultNigoriKeyName()) { On 2014/08/11 21:05:42, stanisc wrote: > Should ...
6 years, 4 months ago (2014-08-11 21:50:22 UTC) #4
stanisc
On 2014/08/11 21:50:14, rlarocque wrote: > On 2014/08/11 21:05:42, stanisc wrote: > > Mostly looks ...
6 years, 4 months ago (2014-08-12 00:30:00 UTC) #5
Nicolas Zea
Some comments. Also maybe add a unit test for the copy constructor for cryptographer? https://codereview.chromium.org/452283003/diff/20001/sync/engine/model_type_sync_proxy_impl.cc ...
6 years, 4 months ago (2014-08-13 20:49:08 UTC) #6
rlarocque
Sorry for the slow response. Patch updated; PTAL. https://codereview.chromium.org/452283003/diff/20001/sync/engine/model_type_sync_proxy_impl.cc File sync/engine/model_type_sync_proxy_impl.cc (right): https://codereview.chromium.org/452283003/diff/20001/sync/engine/model_type_sync_proxy_impl.cc#newcode243 sync/engine/model_type_sync_proxy_impl.cc:243: DVLOG(1) ...
6 years, 4 months ago (2014-08-15 18:33:18 UTC) #7
rlarocque
Patch updated again with a test for the cryptographer's copy constructor. https://codereview.chromium.org/452283003/diff/20001/sync/internal_api/sync_manager_impl.cc File sync/internal_api/sync_manager_impl.cc (right): ...
6 years, 4 months ago (2014-08-15 19:08:15 UTC) #8
Nicolas Zea
lgtm
6 years, 4 months ago (2014-08-15 20:43:05 UTC) #9
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 4 months ago (2014-08-15 20:47:09 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/452283003/100001
6 years, 4 months ago (2014-08-15 20:50:37 UTC) #11
commit-bot: I haz the power
6 years, 4 months ago (2014-08-16 00:34:19 UTC) #12
Message was sent while issue was closed.
Committed patchset #6 (100001) as 290067

Powered by Google App Engine
This is Rietveld 408576698