|
Separate sync and invalidation client IDs
This is part of the effort to make invalidations independent from sync.
Previously, the invalidator's client ID was equal to sync's "cache
guid". The cache guid is stored in the sync DB and managed by the sync
thread.
The newly introduced invalidator client ID is stored in the
InvalidationStateTracker, which is backed by the preferences store and
lives on the UI thread.
The InvalidatorFactory is responsible for managing the invalidator
client ID. During early sync initialization, it will check the
InvalidationStateTracker to see if the client ID is set. If not, it
will clear any existing client state that may exist and generate a
new ID. This clearing is necessary because the invalidation client
can't tolerate a change to its ID once it is initialized.
As part of this change, the many invalidator implementations have been
modified to accept a 'notifier_client_id' parameter in their
constructor. This API change better reflects the fact that the client
ID may not be changed at runtime, and is made possible by the fact that
the notifier client ID is now available before the notifier is
constructed.
The SyncManager is informed of the notifier client ID when it is
constructed. The syncer will send up the notifier client ID (in
addition to the existing cache_guid) on all its requests to the syncer.
BUG= 124142
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+228 lines, -126 lines) |
Patch |
 |
M |
chrome/browser/sync/about_sync_util.cc
|
View
|
|
2 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/android_invalidator_bridge.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/android_invalidator_bridge.cc
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/android_invalidator_bridge_proxy.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/android_invalidator_bridge_proxy.cc
|
View
|
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/sync_backend_host.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/invalidations/invalidator_storage.h
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/invalidations/invalidator_storage.cc
|
View
|
|
3 chunks |
+14 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service_unittest.cc
|
View
|
|
2 chunks |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/common/pref_names.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/common/pref_names.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/engine/all_status.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/engine/all_status.cc
|
View
|
|
1 chunk |
+8 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sync/engine/sync_scheduler_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/engine/sync_scheduler_whitebox_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/engine/sync_session_job_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/engine/syncer_proto_util.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
sync/engine/syncer_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/internal_api/internal_components_factory_impl.cc
|
View
|
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/public/engine/sync_status.h
|
View
|
|
1 chunk |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/public/internal_components_factory.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/internal_api/public/internal_components_factory_impl.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/internal_api/public/sync_manager.h
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/public/test/fake_sync_manager.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/public/test/test_internal_components_factory.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/internal_api/sync_manager_impl.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/sync_manager_impl.cc
|
View
|
|
3 chunks |
+9 lines, -6 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/sync_manager_impl_unittest.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/test/fake_sync_manager.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
sync/internal_api/test/test_internal_components_factory.cc
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/fake_invalidation_state_tracker.h
|
View
|
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/fake_invalidation_state_tracker.cc
|
View
|
|
2 chunks |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/fake_invalidator.h
|
View
|
|
2 chunks |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/fake_invalidator.cc
|
View
|
|
2 chunks |
+0 lines, -8 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/fake_invalidator_unittest.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/invalidation_notifier.h
|
View
|
|
3 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/invalidation_notifier.cc
|
View
|
|
3 chunks |
+3 lines, -8 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/invalidation_notifier_unittest.cc
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/invalidation_state_tracker.h
|
View
|
|
2 chunks |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/invalidator.h
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/invalidator_factory.h
|
View
|
|
1 chunk |
+9 lines, -4 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/invalidator_factory.cc
|
View
|
|
5 chunks |
+42 lines, -11 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/invalidator_registrar_unittest.cc
|
View
|
|
2 chunks |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/invalidator_test_template.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/non_blocking_invalidator.h
|
View
|
|
3 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/notifier/non_blocking_invalidator.cc
|
View
|
|
7 chunks |
+7 lines, -17 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/non_blocking_invalidator_unittest.cc
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/p2p_invalidator.h
|
View
|
|
3 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/p2p_invalidator.cc
|
View
|
|
6 chunks |
+8 lines, -11 lines |
0 comments
|
Download
|
 |
M |
sync/notifier/p2p_invalidator_unittest.cc
|
View
|
|
5 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
sync/protocol/sync.proto
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/sessions/sync_session_context.h
|
View
|
|
3 chunks |
+8 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/sessions/sync_session_context.cc
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sync/sessions/sync_session_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/test/engine/syncer_command_test.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
sync/tools/null_invalidation_state_tracker.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sync/tools/null_invalidation_state_tracker.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|