|
[Sync] ModelTypeStore factory shouldn't require valid PSS to function correctly
The issue is that PSS::GetModelTypeStoreFactory requires valid PSS which doesn't
have to be available when sync is disabled (for example in guest mode on
ChromeOS). The reason it is currently wired through PSS is that PSS conveniently
has path and blocking task runner required for ModelTypeStore.
I added static GetModelTypeStoreFactory function that takes profile path and
SequencedWorkerPool. It ensures that, for a given path, all task runners use the
same sequence token and thus properly sequneced. Datatypes that wish to be
hosted in shared leveldb database should use this factory function.
I also fixed issue that backend_map_ is accessed from multiple threads and thus
might get corrupt. I wrapped it into a class with lock.
BUG= 688533
R=skym@chromium.org
Review-Url: https://codereview.chromium.org/2732333003
Cr-Commit-Position: refs/heads/master@{#455749}
Committed: https://chromium.googlesource.com/chromium/src/+/222de9fb1677cdabfbf8998c17dd0e394f71a81e
Total comments: 5
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+163 lines, -104 lines) |
Patch |
 |
M |
chrome/browser/chromeos/printing/printers_manager_factory.cc
|
View
|
1
2
3
|
2 chunks |
+4 lines, -10 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/chrome_sync_client.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/chrome_sync_client.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service_factory.cc
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_test_util.cc
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
components/browser_sync/profile_sync_service.h
|
View
|
1
2
3
4
|
5 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
components/browser_sync/profile_sync_service.cc
|
View
|
|
8 chunks |
+22 lines, -14 lines |
0 comments
|
Download
|
 |
M |
components/browser_sync/profile_sync_test_util.cc
|
View
|
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/fake_sync_client.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/fake_sync_client.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/sync_client.h
|
View
|
|
2 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/sync_service_base.h
|
View
|
|
2 chunks |
+10 lines, -5 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/sync_service_base.cc
|
View
|
|
3 chunks |
+16 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/sync/model/model_type_store.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
components/sync/model_impl/model_type_store_backend.h
|
View
|
1
2
3
|
4 chunks |
+8 lines, -12 lines |
0 comments
|
Download
|
 |
M |
components/sync/model_impl/model_type_store_backend.cc
|
View
|
1
2
3
4
|
9 chunks |
+64 lines, -14 lines |
0 comments
|
Download
|
 |
M |
components/sync/model_impl/model_type_store_backend_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -6 lines |
0 comments
|
Download
|
 |
M |
ios/chrome/browser/reading_list/reading_list_model_factory.cc
|
View
|
1
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.cc
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
ios/chrome/browser/sync/ios_chrome_profile_sync_test_util.cc
|
View
|
1
|
2 chunks |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
ios/chrome/browser/sync/ios_chrome_sync_client.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
ios/chrome/browser/sync/ios_chrome_sync_client.mm
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
Total messages: 42 (34 generated)
|