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

..17-Jul-201220 KiB

abstract_profile_sync_service_test.cc17-Jul-20124 KiB

abstract_profile_sync_service_test.h17-Jul-20121.9 KiB

backend_migrator.cc17-Jul-20126.2 KiB

backend_migrator.h17-Jul-20122.3 KiB

backend_migrator_unittest.cc17-Jul-20129.9 KiB

DEPS17-Jul-2012108

engine/17-Jul-20124 KiB

glue/17-Jul-201212 KiB

js_arg_list.cc17-Jul-20121.5 KiB

js_arg_list.h17-Jul-20121.4 KiB

js_arg_list_unittest.cc17-Jul-20121.6 KiB

js_backend.h17-Jul-20121.2 KiB

js_event_handler.h17-Jul-2012709

js_event_handler_list.cc17-Jul-20122.7 KiB

js_event_handler_list.h17-Jul-20122.3 KiB

js_event_handler_list_unittest.cc17-Jul-20124 KiB

js_event_router.h17-Jul-20121.1 KiB

js_frontend.h17-Jul-20121.2 KiB

js_sync_manager_observer.cc17-Jul-20124.5 KiB

js_sync_manager_observer.h17-Jul-20121.9 KiB

js_sync_manager_observer_unittest.cc17-Jul-20129.7 KiB

js_test_util.cc17-Jul-20121.9 KiB

js_test_util.h17-Jul-20122.3 KiB

notifier/17-Jul-20124 KiB

PRESUBMIT.py17-Jul-2012479

profile_sync_factory.h17-Jul-20125.6 KiB

profile_sync_factory_impl.cc17-Jul-201213.5 KiB

profile_sync_factory_impl.h17-Jul-20122.9 KiB

profile_sync_factory_impl_unittest.cc17-Jul-20125.2 KiB

profile_sync_factory_mock.cc17-Jul-20121.2 KiB

profile_sync_factory_mock.h17-Jul-20123.6 KiB

profile_sync_service.cc17-Jul-201243.9 KiB

profile_sync_service.h17-Jul-201225.8 KiB

profile_sync_service_autofill_unittest.cc17-Jul-201243.1 KiB

profile_sync_service_bookmark_unittest.cc17-Jul-201248 KiB

profile_sync_service_harness.cc17-Jul-201222 KiB

profile_sync_service_harness.h17-Jul-20128.4 KiB

profile_sync_service_mock.cc17-Jul-2012481

profile_sync_service_mock.h17-Jul-20122.7 KiB

profile_sync_service_observer.h17-Jul-20121,006

profile_sync_service_password_unittest.cc17-Jul-201223.5 KiB

profile_sync_service_preference_unittest.cc17-Jul-201219 KiB

profile_sync_service_session_unittest.cc17-Jul-201216.9 KiB

profile_sync_service_startup_unittest.cc17-Jul-201210.1 KiB

profile_sync_service_typed_url_unittest.cc17-Jul-201221.8 KiB

profile_sync_service_unittest.cc17-Jul-201213.7 KiB

profile_sync_test_util.cc17-Jul-20122.5 KiB

profile_sync_test_util.h17-Jul-20122.5 KiB

protocol/17-Jul-20124 KiB

README.js17-Jul-20122.4 KiB

resources/17-Jul-20124 KiB

sessions/17-Jul-20124 KiB

signin_manager.cc17-Jul-20125.8 KiB

signin_manager.h17-Jul-20123.3 KiB

signin_manager_unittest.cc17-Jul-20125.7 KiB

sync_setup_flow.cc17-Jul-201215.2 KiB

sync_setup_flow.h17-Jul-20126.3 KiB

sync_setup_flow_handler.h17-Jul-20121.2 KiB

sync_setup_wizard.cc17-Jul-20122.6 KiB

sync_setup_wizard.h17-Jul-20123.5 KiB

sync_setup_wizard_unittest.cc17-Jul-201219.8 KiB

sync_ui_util.cc17-Jul-201217.6 KiB

sync_ui_util.h17-Jul-20122.8 KiB

sync_ui_util_mac.h17-Jul-2012922

sync_ui_util_mac.mm17-Jul-20122.4 KiB

sync_ui_util_mac_unittest.mm17-Jul-20123.9 KiB

sync_ui_util_unittest.cc17-Jul-20121.5 KiB

syncable/17-Jul-20124 KiB

test_profile_sync_service.cc17-Jul-20128.8 KiB

test_profile_sync_service.h17-Jul-20124.6 KiB

tools/17-Jul-20124 KiB

unrecoverable_error_handler.h17-Jul-2012972

util/17-Jul-20124 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