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

Issue 10827266: [Sync] Add SyncEncryptionHandler (Closed)

Created:
8 years, 4 months ago by Nicolas Zea
Modified:
8 years, 4 months ago
CC:
chromium-reviews, Raghu Simha, ncarter (slow), akalin, tim (not reviewing)
Visibility:
Public.

Description

[Sync] Add SyncEncryptionHandler All sync-specific encryption state (types, encrypt everything, explicit passphrase, keys) is now tracked within the new class SyncEncryptionHandler. It's owned by the sync manager, and unifies some of the observer logic we previously had. In addition, it's capable of creating its own transactions, taking us a step closer to have a nigori datatype. In addition, we add a NigoriHandler to abstract the chrome-side of encryption from the sync visible side of encryption. BUG=139848 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=151833

Patch Set 1 #

Total comments: 1

Patch Set 2 : Self review #

Patch Set 3 : Self review 2 #

Patch Set 4 : Fix tests #

Total comments: 8

Patch Set 5 : Address comments. #

Total comments: 49

Patch Set 6 : Address comments 2 #

Total comments: 18

Patch Set 7 : Address comments 3 #

Total comments: 8

Patch Set 8 : Address comments 4 #

Patch Set 9 : Rebase #

Patch Set 10 : Fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2543 lines, -1728 lines) Patch
M chrome/browser/sync/DEPS View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.h View 1 2 3 4 5 6 7 8 7 chunks +13 lines, -12 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.cc View 1 2 3 4 5 6 7 8 13 chunks +52 lines, -55 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_bookmark_unittest.cc View 1 2 3 4 5 6 7 8 4 chunks +11 lines, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_password_unittest.cc View 1 chunk +11 lines, -1 line 0 comments Download
M sync/engine/apply_updates_command_unittest.cc View 1 2 3 4 8 chunks +17 lines, -14 lines 0 comments Download
M sync/engine/conflict_resolver.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M sync/engine/syncer_unittest.cc View 1 2 3 4 5 6 7 15 chunks +40 lines, -116 lines 0 comments Download
M sync/engine/syncer_util.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M sync/internal_api/debug_info_event_listener.h View 1 4 chunks +10 lines, -8 lines 0 comments Download
M sync/internal_api/debug_info_event_listener.cc View 1 2 chunks +8 lines, -8 lines 0 comments Download
A + sync/internal_api/js_sync_encryption_handler_observer.h View 4 chunks +12 lines, -20 lines 0 comments Download
A sync/internal_api/js_sync_encryption_handler_observer.cc View 1 chunk +109 lines, -0 lines 0 comments Download
A sync/internal_api/js_sync_encryption_handler_observer_unittest.cc View 1 chunk +158 lines, -0 lines 0 comments Download
M sync/internal_api/js_sync_manager_observer.h View 1 chunk +0 lines, -10 lines 0 comments Download
M sync/internal_api/js_sync_manager_observer.cc View 1 chunk +0 lines, -52 lines 0 comments Download
M sync/internal_api/js_sync_manager_observer_unittest.cc View 3 chunks +0 lines, -71 lines 0 comments Download
A sync/internal_api/public/sync_encryption_handler.h View 1 2 3 4 5 1 chunk +151 lines, -0 lines 0 comments Download
A sync/internal_api/public/sync_encryption_handler.cc View 1 2 3 4 1 chunk +25 lines, -0 lines 0 comments Download
M sync/internal_api/public/sync_manager.h View 1 2 3 4 5 6 7 8 9 chunks +5 lines, -112 lines 0 comments Download
M sync/internal_api/public/test/fake_sync_manager.h View 1 2 3 4 5 6 7 8 4 chunks +5 lines, -7 lines 0 comments Download
M sync/internal_api/public/util/sync_string_conversions.h View 1 chunk +1 line, -0 lines 0 comments Download
A sync/internal_api/sync_encryption_handler_impl.h View 1 2 3 4 5 1 chunk +161 lines, -0 lines 0 comments Download
A sync/internal_api/sync_encryption_handler_impl.cc View 1 2 3 4 5 6 1 chunk +678 lines, -0 lines 0 comments Download
A sync/internal_api/sync_encryption_handler_impl_unittest.cc View 1 2 3 4 5 6 7 1 chunk +380 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl.h View 1 2 3 4 5 6 7 8 9 chunks +29 lines, -66 lines 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 1 2 3 4 5 6 7 8 14 chunks +76 lines, -627 lines 0 comments Download
M sync/internal_api/sync_manager_impl_unittest.cc View 1 2 3 4 5 6 7 8 38 chunks +189 lines, -106 lines 0 comments Download
M sync/internal_api/test/fake_sync_manager.cc View 1 2 3 4 5 6 7 8 6 chunks +8 lines, -25 lines 0 comments Download
M sync/sync.gyp View 1 2 3 4 5 6 7 8 9 6 chunks +12 lines, -0 lines 0 comments Download
A sync/syncable/nigori_handler.h View 1 2 3 4 5 1 chunk +46 lines, -0 lines 0 comments Download
A sync/syncable/nigori_handler.cc View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
M sync/syncable/nigori_util.h View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
M sync/syncable/nigori_util.cc View 1 2 3 4 5 1 chunk +65 lines, -0 lines 0 comments Download
A sync/test/fake_sync_encryption_handler.h View 1 2 3 4 5 1 chunk +66 lines, -0 lines 0 comments Download
A sync/test/fake_sync_encryption_handler.cc View 1 2 3 4 5 1 chunk +106 lines, -0 lines 0 comments Download
M sync/util/DEPS View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M sync/util/cryptographer.h View 1 2 3 4 5 6 7 chunks +38 lines, -86 lines 0 comments Download
M sync/util/cryptographer.cc View 1 2 3 4 5 5 chunks +25 lines, -153 lines 0 comments Download
M sync/util/cryptographer_unittest.cc View 3 chunks +0 lines, -172 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Nicolas Zea
Enjoy! I've preserved all existing tests. The plan is to, as two separate subsequent patches, ...
8 years, 4 months ago (2012-08-10 02:58:06 UTC) #1
tim (not reviewing)
http://codereview.chromium.org/10827266/diff/8001/chrome/browser/sync/glue/nigori_change_processor.h File chrome/browser/sync/glue/nigori_change_processor.h (right): http://codereview.chromium.org/10827266/diff/8001/chrome/browser/sync/glue/nigori_change_processor.h#newcode37 chrome/browser/sync/glue/nigori_change_processor.h:37: // TODO(zea): ChangeProcessor implementation. Why is this called ChangeProcessor ...
8 years, 4 months ago (2012-08-12 23:31:20 UTC) #2
tim (not reviewing)
Following our offline discussion, let me know when NigoriChangeProcessor is removed and comments below are ...
8 years, 4 months ago (2012-08-13 20:01:00 UTC) #3
Nicolas Zea
NigoriChangeProcessor has been removed, and I added a NigoriHandler interface in syncable/, which the sync ...
8 years, 4 months ago (2012-08-13 22:56:38 UTC) #4
tim (not reviewing)
This patch looks cool. I have some suggestions based mostly on initial reactions to seeing ...
8 years, 4 months ago (2012-08-14 02:32:20 UTC) #5
tim (not reviewing)
http://codereview.chromium.org/10827266/diff/12001/sync/internal_api/sync_encryption_handler_impl.cc File sync/internal_api/sync_encryption_handler_impl.cc (right): http://codereview.chromium.org/10827266/diff/12001/sync/internal_api/sync_encryption_handler_impl.cc#newcode609 sync/internal_api/sync_encryption_handler_impl.cc:609: return false; On 2012/08/14 02:32:20, timsteele wrote: > these ...
8 years, 4 months ago (2012-08-14 02:34:13 UTC) #6
Nicolas Zea
PTAL. I added a TODO to add a transaction param to the GetEncryptedTypes method, since ...
8 years, 4 months ago (2012-08-14 23:24:51 UTC) #7
tim (not reviewing)
http://codereview.chromium.org/10827266/diff/8002/chrome/browser/sync/glue/sync_backend_host.cc File chrome/browser/sync/glue/sync_backend_host.cc (right): http://codereview.chromium.org/10827266/diff/8002/chrome/browser/sync/glue/sync_backend_host.cc#newcode1334 chrome/browser/sync/glue/sync_backend_host.cc:1334: AssociateNigori(js_backend); Can we cache js_backend somewhere in this class ...
8 years, 4 months ago (2012-08-15 00:23:30 UTC) #8
Nicolas Zea
All comments addressed. http://codereview.chromium.org/10827266/diff/8002/chrome/browser/sync/glue/sync_backend_host.cc File chrome/browser/sync/glue/sync_backend_host.cc (right): http://codereview.chromium.org/10827266/diff/8002/chrome/browser/sync/glue/sync_backend_host.cc#newcode1334 chrome/browser/sync/glue/sync_backend_host.cc:1334: AssociateNigori(js_backend); On 2012/08/15 00:23:30, timsteele wrote: ...
8 years, 4 months ago (2012-08-15 01:08:29 UTC) #9
tim (not reviewing)
This is looking good! Couple more comments and just finishing reviewing some tests. http://codereview.chromium.org/10827266/diff/14001/chrome/browser/sync/glue/sync_backend_host.cc File ...
8 years, 4 months ago (2012-08-15 01:39:02 UTC) #10
Nicolas Zea
http://codereview.chromium.org/10827266/diff/14001/chrome/browser/sync/glue/sync_backend_host.cc File chrome/browser/sync/glue/sync_backend_host.cc (right): http://codereview.chromium.org/10827266/diff/14001/chrome/browser/sync/glue/sync_backend_host.cc#newcode1342 chrome/browser/sync/glue/sync_backend_host.cc:1342: frontend_->OnBackendInitialized(js_backend_, true); On 2012/08/15 01:39:02, timsteele wrote: > Can ...
8 years, 4 months ago (2012-08-15 20:56:49 UTC) #11
tim (not reviewing)
LGTM
8 years, 4 months ago (2012-08-15 22:26:08 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zea@chromium.org/10827266/10047
8 years, 4 months ago (2012-08-16 00:42:44 UTC) #13
commit-bot: I haz the power
Try job failure for 10827266-10047 (retry) on win for step "runhooks". It's a second try, ...
8 years, 4 months ago (2012-08-16 00:57:12 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zea@chromium.org/10827266/169
8 years, 4 months ago (2012-08-16 01:10:08 UTC) #15
commit-bot: I haz the power
Change committed as 151833
8 years, 4 months ago (2012-08-16 02:34:18 UTC) #16
Nicolas Zea
8 years, 4 months ago (2012-08-21 19:54:42 UTC) #17
actually, you can hold off on this. Found a significant issue I'll be addressing
a separate patchset.

Powered by Google App Engine
This is Rietveld 408576698