• Home
  • History
  • Annotate
  • only in /external/chromium/chrome/browser/sync/
NameDateSize

..22-Apr-201320 KiB

abstract_profile_sync_service_test.cc22-Apr-20134 KiB

abstract_profile_sync_service_test.h22-Apr-20131.9 KiB

backend_migrator.cc22-Apr-20136.2 KiB

backend_migrator.h22-Apr-20132.3 KiB

backend_migrator_unittest.cc22-Apr-20139.9 KiB

DEPS22-Apr-2013108

engine/22-Apr-20134 KiB

glue/22-Apr-201312 KiB

js_arg_list.cc22-Apr-20131.5 KiB

js_arg_list.h22-Apr-20131.4 KiB

js_arg_list_unittest.cc22-Apr-20131.6 KiB

js_backend.h22-Apr-20131.2 KiB

js_event_handler.h22-Apr-2013709

js_event_handler_list.cc22-Apr-20132.7 KiB

js_event_handler_list.h22-Apr-20132.3 KiB

js_event_handler_list_unittest.cc22-Apr-20134 KiB

js_event_router.h22-Apr-20131.1 KiB

js_frontend.h22-Apr-20131.2 KiB

js_sync_manager_observer.cc22-Apr-20134.5 KiB

js_sync_manager_observer.h22-Apr-20131.9 KiB

js_sync_manager_observer_unittest.cc22-Apr-20139.7 KiB

js_test_util.cc22-Apr-20131.9 KiB

js_test_util.h22-Apr-20132.3 KiB

notifier/22-Apr-20134 KiB

PRESUBMIT.py22-Apr-2013479

profile_sync_factory.h22-Apr-20135.6 KiB

profile_sync_factory_impl.cc22-Apr-201313.5 KiB

profile_sync_factory_impl.h22-Apr-20132.9 KiB

profile_sync_factory_impl_unittest.cc22-Apr-20135.2 KiB

profile_sync_factory_mock.cc22-Apr-20131.2 KiB

profile_sync_factory_mock.h22-Apr-20133.6 KiB

profile_sync_service.cc22-Apr-201343.9 KiB

profile_sync_service.h22-Apr-201325.8 KiB

profile_sync_service_autofill_unittest.cc22-Apr-201343.1 KiB

profile_sync_service_bookmark_unittest.cc22-Apr-201348 KiB

profile_sync_service_harness.cc22-Apr-201322 KiB

profile_sync_service_harness.h22-Apr-20138.4 KiB

profile_sync_service_mock.cc22-Apr-2013481

profile_sync_service_mock.h22-Apr-20132.7 KiB

profile_sync_service_observer.h22-Apr-20131,006

profile_sync_service_password_unittest.cc22-Apr-201323.5 KiB

profile_sync_service_preference_unittest.cc22-Apr-201319 KiB

profile_sync_service_session_unittest.cc22-Apr-201316.9 KiB

profile_sync_service_startup_unittest.cc22-Apr-201310.1 KiB

profile_sync_service_typed_url_unittest.cc22-Apr-201321.8 KiB

profile_sync_service_unittest.cc22-Apr-201313.7 KiB

profile_sync_test_util.cc22-Apr-20132.5 KiB

profile_sync_test_util.h22-Apr-20132.5 KiB

protocol/22-Apr-20134 KiB

README.js22-Apr-20132.4 KiB

resources/22-Apr-20134 KiB

sessions/22-Apr-20134 KiB

signin_manager.cc22-Apr-20135.8 KiB

signin_manager.h22-Apr-20133.3 KiB

signin_manager_unittest.cc22-Apr-20135.7 KiB

sync_setup_flow.cc22-Apr-201315.2 KiB

sync_setup_flow.h22-Apr-20136.3 KiB

sync_setup_flow_handler.h22-Apr-20131.2 KiB

sync_setup_wizard.cc22-Apr-20132.6 KiB

sync_setup_wizard.h22-Apr-20133.5 KiB

sync_setup_wizard_unittest.cc22-Apr-201319.8 KiB

sync_ui_util.cc22-Apr-201317.6 KiB

sync_ui_util.h22-Apr-20132.8 KiB

sync_ui_util_mac.h22-Apr-2013922

sync_ui_util_mac.mm22-Apr-20132.4 KiB

sync_ui_util_mac_unittest.mm22-Apr-20133.9 KiB

sync_ui_util_unittest.cc22-Apr-20131.5 KiB

syncable/22-Apr-20134 KiB

test_profile_sync_service.cc22-Apr-20138.8 KiB

test_profile_sync_service.h22-Apr-20134.6 KiB

tools/22-Apr-20134 KiB

unrecoverable_error_handler.h22-Apr-2013972

util/22-Apr-20134 KiB

README.js

1Overview of chrome://sync-internals
2-----------------------------------
3
4This note explains how chrome://sync-internals (also known as
5about:sync) interacts with the sync service/backend.
6
7Basically, chrome://sync-internals sends asynchronous messages to the
8sync backend and the sync backend asynchronously raises events to
9chrome://sync-internals, either when replying to messages or when
10something interesting happens.
11
12Both messages and events have a name and a list of arguments, the
13latter of which is represented by a JsArgList (js_arg_list.h) object,
14which is basically a wrapper around an immutable ListValue.
15
16TODO(akalin): Move all the js_* files into a js/ subdirectory.
17
18Message/event flow
19------------------
20
21chrome://sync-internals is represented by SyncInternalsUI
22(chrome/browser/web_ui/sync_internals_ui.h).  SyncInternalsUI
23interacts with the sync service via a JsFrontend (js_frontend.h)
24object, which has a ProcessMessage() method.  The JsFrontend can
25handle some messages itself, but it can also delegate the rest to a
26JsBackend instance (js_backend.h), which also has a ProcessMessage()
27method.  A JsBackend can in turn handle some messages itself and
28delegate to other JsBackend instances.
29
30Essentially, there is a tree with a JsFrontend as the root and
31JsBackend as non-root internal nodes and leaf nodes (although
32currently, the tree is more like a simple list).  The sets of messages
33handled by the JsBackends and the JsFrontend are disjoint, which means
34that at most one node handles a given message type.  Also, the
35JsBackends may live on different threads, but JsArgList is thread-safe
36so that's okay.
37
38SyncInternalsUI is a JsEventHandler (js_event_handler.h), which means
39that it has a HandleJsEvent() method, but JsBackends cannot easily
40access those objects.  Instead, each JsBackend keeps track of its
41parent router, which is a JsEventRouter object (js_event_router.h).
42Basically, a JsEventRouter is another JsBackend object or a JsFrontend
43object.  So an event travels up through the JsEventRouter until it
44reaches the JsFrontend, which knows about the existing JsEventHandlers
45(via AddHandler()/RemoveHandler()) and so can delegate to the right
46one.
47
48A diagram of the flow of a message and its reply:
49
50msg(args) -> F -> B -> B -> B
51             |    |    |
52        H <- R <- R <- R <- reply-event(args)
53
54F = JsFrontend, B = JsBackend, R = JsEventRouter, H = JsEventHandler
55
56Non-reply events are percolated up similarly.
57