OLD | NEW |
1 Overview of chrome://sync-internals | 1 Overview of chrome://sync-internals |
2 ----------------------------------- | 2 ----------------------------------- |
3 | 3 |
4 This note explains how chrome://sync-internals (also known as | 4 This note explains how chrome://sync-internals (also known as |
5 about:sync) interacts with the sync service/backend. | 5 about:sync) interacts with the sync service/backend. |
6 | 6 |
7 Basically, chrome://sync-internals sends messages to the sync backend | 7 Basically, chrome://sync-internals sends messages to the sync backend |
8 and the sync backend sends the reply asynchronously. The sync backend | 8 and the sync backend sends the reply asynchronously. The sync backend |
9 also asynchronously raises events which chrome://sync-internals listen | 9 also asynchronously raises events which chrome://sync-internals listen |
10 to. | 10 to. |
11 | 11 |
12 A message and its reply has a name and a list of arguments, which is | 12 A message and its reply has a name and a list of arguments, which is |
13 basically a wrapper around an immutable ListValue. | 13 basically a wrapper around an immutable ListValue. |
14 | 14 |
15 An event has a name and a details object, which is represented by a | 15 An event has a name and a details object, which is represented by a |
16 JsEventDetails (js_event_details.h) object, which is basically a | 16 JsEventDetails (js_event_details.h) object, which is basically a |
17 wrapper around an immutable DictionaryValue. | 17 wrapper around an immutable DictionaryValue. |
18 | 18 |
19 TODO(akalin): Move all the js_* files into a js/ subdirectory. | |
20 | |
21 Message/event flow | 19 Message/event flow |
22 ------------------ | 20 ------------------ |
23 | 21 |
24 chrome://sync-internals is represented by SyncInternalsUI | 22 chrome://sync-internals is represented by SyncInternalsUI |
25 (chrome/browser/ui/webui/sync_internals_ui.h). SyncInternalsUI | 23 (chrome/browser/ui/webui/sync_internals_ui.h). SyncInternalsUI |
26 interacts with the sync service via a JsController (js_controller.h) | 24 interacts with the sync service via a JsController (js_controller.h) |
27 object, which has a ProcessJsMessage() method that just delegates to | 25 object, which has a ProcessJsMessage() method that just delegates to |
28 an underlying JsBackend instance (js_backend.h). The SyncInternalsUI | 26 an underlying JsBackend instance (js_backend.h). The SyncInternalsUI |
29 object also registers itself (as a JsEventHandler | 27 object also registers itself (as a JsEventHandler |
30 [js_event_handler.h]) to the JsController object, and any events | 28 [js_event_handler.h]) to the JsController object, and any events |
(...skipping 10 matching lines...) Expand all Loading... |
41 | 39 |
42 - SyncInternalsUI (implements JsEventHandler, JsReplyHandler) | 40 - SyncInternalsUI (implements JsEventHandler, JsReplyHandler) |
43 - SyncJsController (implements JsController, JsEventHandler) | 41 - SyncJsController (implements JsController, JsEventHandler) |
44 | 42 |
45 The following objects live on the sync thread: | 43 The following objects live on the sync thread: |
46 | 44 |
47 - SyncManager::SyncInternal (implements JsBackend) | 45 - SyncManager::SyncInternal (implements JsBackend) |
48 | 46 |
49 Of course, none of these objects need to know where the other objects | 47 Of course, none of these objects need to know where the other objects |
50 live, since they interact via WeakHandles. | 48 live, since they interact via WeakHandles. |
OLD | NEW |