|
Remove initial_sync_ended bits
As of crbug.com/164288, we can no longer trust initial_sync_ended. If
my diagnosis is correct, then there are some clients out there who have
their initial_sync_ended bits set for some data types which have not
actually been synced. Those clients now crash at every startup.
This change attempts to solve the problem by removing the separate
initial_sync_ended array of bools and checking the database directly to
learn of a type's status. The new definition of initial_sync_ended is
that a type has finished initial sync if its top level folder has been
downloaded and applied.
To prevent crashing if the server decides to not send us those root
nodes during the control types configure step, we now check that all
control types are initial_sync_ended following that configure and fail
gracefully if their initial sync is not completed.
The new definition of initial_sync_ended makes it much easier to hit
crbug.com/164914. That bug would prevent us from saving our changes
following a call to PurgeEntriesWithTypeIn() in some situations. This
commit also fixes that bug.
Since the initial sync ended status is no longer independent from the
database state, it is no longer necessary to collect debug info as to
its status. It has been removed from the about:sync UI and other debug
info reporting mechanisms. Its role in unit tests has also been greatly
reduced.
BUG= 164288, 164914
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=172707
Total comments: 14
Total comments: 2
Total comments: 1
Total comments: 2
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+565 lines, -307 lines) |
Patch |
 |
M |
chrome/browser/sync/about_sync_util.cc
|
View
|
|
2 chunks |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/sync_backend_host.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+16 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/sync_backend_host_unittest.cc
|
View
|
1
2
3
4
5
|
17 chunks |
+29 lines, -17 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+12 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test_profile_sync_service.h
|
View
|
1
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test_profile_sync_service.cc
|
View
|
1
|
2 chunks |
+3 lines, -15 lines |
0 comments
|
Download
|
 |
M |
sync/engine/all_status.cc
|
View
|
|
3 chunks |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
sync/engine/apply_control_data_updates.cc
|
View
|
|
1 chunk |
+0 lines, -11 lines |
0 comments
|
Download
|
 |
M |
sync/engine/apply_control_data_updates_unittest.cc
|
View
|
|
14 chunks |
+0 lines, -22 lines |
0 comments
|
Download
|
 |
M |
sync/engine/apply_updates_and_resolve_conflicts_command.cc
|
View
|
|
1 chunk |
+0 lines, -14 lines |
0 comments
|
Download
|
 |
M |
sync/engine/syncer_unittest.cc
|
View
|
|
4 chunks |
+0 lines, -12 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/js_sync_manager_observer_unittest.cc
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/public/engine/sync_status.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/public/engine/sync_status.cc
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/internal_api/public/sessions/sync_session_snapshot.h
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/public/sessions/sync_session_snapshot.cc
|
View
|
|
5 chunks |
+1 line, -17 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc
|
View
|
|
4 chunks |
+1 line, -12 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/public/test/test_entry_factory.h
|
View
|
1
2
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/sync_manager_impl.cc
|
View
|
1
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/internal_api/sync_manager_impl_unittest.cc
|
View
|
1
2
|
11 chunks |
+74 lines, -53 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/test/test_entry_factory.cc
|
View
|
1
2
|
1 chunk |
+22 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/test/test_user_share.cc
|
View
|
|
2 chunks |
+2 lines, -20 lines |
0 comments
|
Download
|
 |
M |
sync/sessions/sync_session.cc
|
View
|
|
2 chunks |
+0 lines, -10 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/directory.h
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+3 lines, -6 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/directory.cc
|
View
|
|
3 chunks |
+22 lines, -24 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/directory_backing_store.h
|
View
|
1
2
3
4
5
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/directory_backing_store.cc
|
View
|
1
2
3
4
5
6
|
13 chunks |
+48 lines, -29 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/directory_backing_store_unittest.cc
|
View
|
1
2
3
4
5
|
7 chunks |
+272 lines, -3 lines |
0 comments
|
Download
|
 |
M |
sync/syncable/syncable_unittest.cc
|
View
|
|
9 chunks |
+14 lines, -15 lines |
0 comments
|
Download
|
 |
M |
sync/test/engine/test_syncable_utils.h
|
View
|
|
2 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/test/engine/test_syncable_utils.cc
|
View
|
|
2 chunks |
+27 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/test/test_directory_backing_store.h
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Total messages: 13 (0 generated)
|