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

Issue 1177853002: [Sync] Add ability to save/restore Nigori to SyncEncryptionHandlerImpl (Closed)

Created:
5 years, 6 months ago by maniscalco
Modified:
5 years, 6 months ago
Reviewers:
Nicolas Zea
CC:
chromium-reviews, tim+watch_chromium.org, zea+watch_chromium.org, maxbogue+watch_chromium.org, pvalenzuela+watch_chromium.org, plaree+watch_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sync] Add ability to save/restore Nigori to SyncEncryptionHandlerImpl SyncEncryptionHandlerImpl now detects when a user enables passphrase encryption locally and notifies observers with the updated Nigori state. An observer can then use this state to restore a future instance of SyncEncryptionHandler. The ability to save/restore Nigori across Directory instances is a prerequisite for issuing a lightweight "dashboard stop and clear" when a user enables passphrase encryption. Add OnLocalSetCustomPassphrase to SyncEncryptionHandler interface. Plumb OnLocalSetCustomPassphrase events from SyncEncryptionHandlerImpl on the sync thread to ProfileSyncService on the UI thread. Loosen a restriction on ModelNeutralMutableEntry's capabilities. BUG=490836 Committed: https://crrev.com/358cabb346973315059d9afbff9d9c17c4b706f2 Cr-Commit-Position: refs/heads/master@{#334513}

Patch Set 1 #

Total comments: 17

Patch Set 2 : Improve test by adding SetUpEncryptionWithKeyForBootstrapping #

Patch Set 3 : Apply CR feedback #

Patch Set 4 : Merge with master #

Total comments: 7

Patch Set 5 : Apply CR feedback, rename, git cl format #

Patch Set 6 : Rename in backend as well #

Unified diffs Side-by-side diffs Delta from patch set Stats (+355 lines, -41 lines) Patch
M chrome/browser/sync/glue/sync_backend_host_core.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_core.cc View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_impl.h View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_impl.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download
M components/sync_driver/sync_frontend.h View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M sync/internal_api/debug_info_event_listener.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M sync/internal_api/debug_info_event_listener.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M sync/internal_api/js_sync_encryption_handler_observer.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M sync/internal_api/js_sync_encryption_handler_observer.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M sync/internal_api/public/sync_encryption_handler.h View 1 2 3 4 3 chunks +15 lines, -4 lines 0 comments Download
M sync/internal_api/sync_encryption_handler_impl.h View 1 2 3 4 3 chunks +12 lines, -1 line 0 comments Download
M sync/internal_api/sync_encryption_handler_impl.cc View 1 2 3 4 4 chunks +62 lines, -10 lines 0 comments Download
M sync/internal_api/sync_encryption_handler_impl_unittest.cc View 1 2 3 4 36 chunks +192 lines, -24 lines 0 comments Download
M sync/internal_api/sync_manager_impl.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl_unittest.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M sync/sessions/model_type_registry.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M sync/sessions/model_type_registry.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M sync/syncable/model_neutral_mutable_entry.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 12 (2 generated)
maniscalco
Nicolas, would you please review this change? It's not as big as it seems. Most ...
5 years, 6 months ago (2015-06-10 21:58:11 UTC) #2
maniscalco
https://codereview.chromium.org/1177853002/diff/1/sync/internal_api/sync_encryption_handler_impl.cc File sync/internal_api/sync_encryption_handler_impl.cc (right): https://codereview.chromium.org/1177853002/diff/1/sync/internal_api/sync_encryption_handler_impl.cc#newcode800 sync/internal_api/sync_encryption_handler_impl.cc:800: syncable::ModelNeutralMutableEntry model_neutral_mutable_entry( I tried a number of ways of ...
5 years, 6 months ago (2015-06-10 22:01:45 UTC) #3
Nicolas Zea
https://codereview.chromium.org/1177853002/diff/1/chrome/browser/sync/profile_sync_service.cc File chrome/browser/sync/profile_sync_service.cc (right): https://codereview.chromium.org/1177853002/diff/1/chrome/browser/sync/profile_sync_service.cc#newcode1417 chrome/browser/sync/profile_sync_service.cc:1417: DCHECK_CURRENTLY_ON(content::BrowserThread::UI); nit: Add a comment with a TODO here ...
5 years, 6 months ago (2015-06-11 17:43:07 UTC) #4
maniscalco
Thanks for the feedback. Good point about including frozen implicit passphrase users. RFAL! I've added ...
5 years, 6 months ago (2015-06-15 16:49:18 UTC) #5
Nicolas Zea
Mostly LG https://codereview.chromium.org/1177853002/diff/50001/sync/internal_api/public/sync_encryption_handler.h File sync/internal_api/public/sync_encryption_handler.h (right): https://codereview.chromium.org/1177853002/diff/50001/sync/internal_api/public/sync_encryption_handler.h#newcode130 sync/internal_api/public/sync_encryption_handler.h:130: virtual void OnLocalSetCustomPassphrase( On 2015/06/15 16:49:18, maniscalco ...
5 years, 6 months ago (2015-06-15 19:16:02 UTC) #6
maniscalco
Rename done. PTAL! https://codereview.chromium.org/1177853002/diff/50001/sync/internal_api/public/sync_encryption_handler.h File sync/internal_api/public/sync_encryption_handler.h (right): https://codereview.chromium.org/1177853002/diff/50001/sync/internal_api/public/sync_encryption_handler.h#newcode130 sync/internal_api/public/sync_encryption_handler.h:130: virtual void OnLocalSetCustomPassphrase( On 2015/06/15 19:16:02, ...
5 years, 6 months ago (2015-06-15 20:07:26 UTC) #7
Nicolas Zea
LGTM!
5 years, 6 months ago (2015-06-15 23:30:56 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1177853002/90001
5 years, 6 months ago (2015-06-16 00:28:19 UTC) #10
commit-bot: I haz the power
Committed patchset #6 (id:90001)
5 years, 6 months ago (2015-06-16 00:37:13 UTC) #11
commit-bot: I haz the power
5 years, 6 months ago (2015-06-16 00:38:19 UTC) #12
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/358cabb346973315059d9afbff9d9c17c4b706f2
Cr-Commit-Position: refs/heads/master@{#334513}

Powered by Google App Engine
This is Rietveld 408576698