|
[Sync] Split encryption state and logic out of PSS and SBHI.
This change consolidates several pieces of state and logic regarding
encryption on the UI thread from ProfileSyncService and
SyncBackendHostImpl into a new class called SyncServiceCrypto.
This unblocks the SyncEngine work by removing several synchronous calls
from the SyncEngine interface, and removing logic from SBHI.
The SyncEncryptionHandler::Observer interface is now used to proxy
calls from the sync thread to the crypto object on the UI thread. SBHC
therefore no longer needs to implement it, SBHI doesn't need weird other
versions of the methods, and SyncEngineHost doesn't need duplicate
versions of several of the methods.
Other notes:
- Added IsNigoriEnabled to DataTypeManager because it no longer made
sense on SyncEngine and it seemed to fit there.
- Moved ClearServerDataEvents to the SyncService header because I needed
it in the new object.
- NotifyObservers and friends have been moved to SyncServiceBase so they
can be bound to the crypto object.
- ProfileSyncService::GetEncryptionObserverForTest() was added to
support the surprising amount of tests abusing the fact that those
methods were technically public before.
- The HasUnrecoverableError() check has been removed from
OnPassphraseRequired() because it doesn't seem necessary.
This change should hopefully have no functional changes.
Potential followup CLs:
- Make SyncServiceCrypto an interface that SyncService exposes so the
encryption related methods can be removed from SyncService.
- Provide SyncServiceCrypto a proxy object that talks directly to
SyncEncryptionHandler instead of routing through the SyncEngine
interface.
- Have SyncServiceCrypto implement DataTypeEncryptionHandler.
BUG= 685337
TBR=pkasting
Review-Url: https://codereview.chromium.org/2663783002
Cr-Commit-Position: refs/heads/master@{#447470}
Committed: https://chromium.googlesource.com/chromium/src/+/f635e7f7a4d7e1f62bab36d230183e499627b9f7
Total comments: 8
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+807 lines, -738 lines) |
Patch |
 |
M |
chrome/browser/autocomplete/search_provider_unittest.cc
|
View
|
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/browser_sync/profile_sync_service.h
|
View
|
1
|
16 chunks |
+9 lines, -81 lines |
0 comments
|
Download
|
 |
M |
components/browser_sync/profile_sync_service.cc
|
View
|
1
|
28 chunks |
+41 lines, -255 lines |
0 comments
|
Download
|
 |
M |
components/browser_sync/profile_sync_service_unittest.cc
|
View
|
|
5 chunks |
+9 lines, -5 lines |
0 comments
|
Download
|
 |
M |
components/sync/BUILD.gn
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/data_type_manager.h
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/data_type_manager_impl.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/data_type_manager_impl.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/data_type_manager_mock.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/glue/sync_backend_host_core.h
|
View
|
|
3 chunks |
+1 line, -17 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/glue/sync_backend_host_core.cc
|
View
|
1
|
3 chunks |
+8 lines, -60 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/glue/sync_backend_host_impl.h
|
View
|
|
5 chunks |
+1 line, -71 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/glue/sync_backend_host_impl.cc
|
View
|
|
4 chunks |
+1 line, -128 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/glue/sync_backend_host_impl_unittest.cc
|
View
|
1
|
2 chunks |
+20 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/sync_service.h
|
View
|
|
1 chunk |
+18 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/sync_service_base.h
|
View
|
1
|
5 chunks |
+26 lines, -4 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/sync_service_base.cc
|
View
|
1
|
4 chunks |
+35 lines, -2 lines |
0 comments
|
Download
|
 |
A |
components/sync/driver/sync_service_crypto.h
|
View
|
1
2
|
1 chunk |
+180 lines, -0 lines |
0 comments
|
Download
|
 |
A |
components/sync/driver/sync_service_crypto.cc
|
View
|
1
|
1 chunk |
+434 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/fake_sync_engine.h
|
View
|
|
2 chunks |
+1 line, -7 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/fake_sync_engine.cc
|
View
|
|
2 chunks |
+1 line, -15 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/sync_encryption_handler.h
|
View
|
|
2 chunks |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/sync_engine.h
|
View
|
|
3 chunks |
+6 lines, -19 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/sync_engine_host.h
|
View
|
|
3 chunks |
+0 lines, -46 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/sync_engine_host_stub.h
|
View
|
|
1 chunk |
+0 lines, -9 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/sync_engine_host_stub.cc
|
View
|
|
1 chunk |
+0 lines, -14 lines |
0 comments
|
Download
|
Total messages: 34 (24 generated)
|