|
Migrate Extensions Store/Policy code to Task Scheduler API
This changes most of Extensions Store/Policy code to use a dedicated
SequencedTaskRunner to post tasks rather than posting on the browser
FILE thread.
Initially I tried to keep the change limited to the sync related
part of the Extensions code. The problem that I ran into is that
different types of storage are handled in a generic way on the
storage frontend (for example, all them were deleted on FILE thread).
So once I migrated the sync storage, I had to modify other storage
types as well. Because of that I had to access backend task
runner singleton from extensions component so in order to satisfy
dependencies I had to move GetBackendTaskRunner() to
extensions/browser/api/storage.
Some of the tests relied on TestBrowserThreadBundle making all
browser threads map to the same physical thread which allowed the
test code to satisfy DCHECK_CURRENTLY_ON(BrowserThread::FILE) check
while running on the main test thread. With this migration that
didn't work anymore so I had to modify ExtensionSettingSyncTest and
PolicyValueStoreTest tests to actually post API calls on the right
sequence. That was the most difficult part of this change.
Other than that the rest of the changes should be straightforward.
BUG= 689520
Review-Url: https://codereview.chromium.org/2965153002
Cr-Commit-Position: refs/heads/master@{#486250}
Committed: https://chromium.googlesource.com/chromium/src/+/6d016c9355721f174c345002f89cb9f750655f6a
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1092 lines, -1016 lines) |
Patch |
 |
M |
chrome/browser/extensions/BUILD.gn
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
D |
chrome/browser/extensions/api/storage/backend_task_runner.h
|
View
|
|
1 chunk |
+0 lines, -18 lines |
0 comments
|
Download
|
 |
D |
chrome/browser/extensions/api/storage/backend_task_runner.cc
|
View
|
|
1 chunk |
+0 lines, -18 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/storage/managed_value_store_cache.h
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/storage/managed_value_store_cache.cc
|
View
|
|
6 chunks |
+11 lines, -11 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/storage/policy_value_store.cc
|
View
|
1
2
3
|
2 chunks |
+2 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/storage/policy_value_store_unittest.cc
|
View
|
1
2
|
7 chunks |
+23 lines, -12 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/storage/settings_sync_processor.cc
|
View
|
1
2
3
|
4 chunks |
+6 lines, -8 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/storage/settings_sync_unittest.cc
|
View
|
1
2
|
21 chunks |
+906 lines, -839 lines |
4 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/storage/settings_sync_util.cc
|
View
|
|
2 chunks |
+2 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/storage/sync_storage_backend.cc
|
View
|
1
2
3
|
9 chunks |
+10 lines, -12 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/storage/sync_value_store_cache.h
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/storage/sync_value_store_cache.cc
|
View
|
|
4 chunks |
+10 lines, -9 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/storage/syncable_settings_storage.cc
|
View
|
1
2
3
|
11 chunks |
+19 lines, -21 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/chrome_sync_client.cc
|
View
|
|
2 chunks |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/extension_setting_data_type_controller.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/extension_settings_helper.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
extensions/browser/api/storage/BUILD.gn
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
A |
extensions/browser/api/storage/backend_task_runner.h
|
View
|
|
1 chunk |
+22 lines, -0 lines |
0 comments
|
Download
|
 |
A |
extensions/browser/api/storage/backend_task_runner.cc
|
View
|
|
1 chunk |
+22 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/api/storage/local_value_store_cache.cc
|
View
|
|
3 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/api/storage/settings_test_util.cc
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/api/storage/storage_frontend.cc
|
View
|
|
4 chunks |
+9 lines, -11 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/api/storage/storage_frontend_unittest.cc
|
View
|
1
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/value_store/lazy_leveldb.cc
|
View
|
1
|
7 chunks |
+9 lines, -8 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/value_store/legacy_value_store_factory.cc
|
View
|
|
4 chunks |
+4 lines, -6 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/value_store/leveldb_value_store.cc
|
View
|
|
9 chunks |
+15 lines, -14 lines |
0 comments
|
Download
|
Total messages: 23 (17 generated)
|