| OLD | NEW |
| 1 Chrome Foundation Services | 1 # Chrome Foundation Services |
| 2 ==== | |
| 3 | 2 |
| 4 ### Overview | 3 [TOC] |
| 4 |
| 5 ## Overview |
| 5 | 6 |
| 6 This directory contains Chrome Foundation Services. If you think of Chrome as a | 7 This directory contains Chrome Foundation Services. If you think of Chrome as a |
| 7 "portable OS," Chrome Foundation Services can be thought of as that OS' | 8 "portable OS," Chrome Foundation Services can be thought of as that OS' |
| 8 foundational "system services" layer. | 9 foundational "system services" layer. |
| 9 | 10 |
| 10 Roughly each subdirectory here corresponds to a service that: | 11 Roughly each subdirectory here corresponds to a service that: |
| 11 | 12 |
| 12 * is a client of `//services/service_manager` with its own unique Identity. | 13 * is a client of `//services/service_manager` with its own unique Identity. |
| 13 * could logically run a standalone process for security/performance isolation | 14 * could logically run a standalone process for security/performance isolation |
| 14 benefits depending on the constraints of the host OS. | 15 benefits depending on the constraints of the host OS. |
| 15 | 16 |
| 16 ### Service Directory Structure | 17 ## Service Directory Structure |
| 17 | 18 |
| 18 Individual services are structured like so: | 19 Individual services are structured like so: |
| 19 | 20 |
| 20 //services/foo/ <-- Implementation code, may have subdirs. | 21 ``` |
| 21 /public/ | 22 //services/foo/ <-- Implementation code, may have subdirs. |
| 22 /cpp/ <-- C++ client libraries (optional) | 23 /public/ |
| 23 /interfaces/ <-- Mojom interfaces | 24 /cpp/ <-- C++ client libraries (optional) |
| 25 /interfaces/ <-- Mojom interfaces |
| 26 ``` |
| 24 | 27 |
| 25 ### Dependencies | 28 ## Dependencies |
| 26 | 29 |
| 27 Code within `//services` may only depend on each other via each other's | 30 Code within `//services` may only depend on each other via each other's |
| 28 `/public/` directories, i.e. implementation code cannot be shared directly. | 31 `/public/` directories, *i.e.* implementation code may not be shared directly. |
| 29 | 32 |
| 30 Service code should also take care to tightly limit the dependencies on static | 33 Service code should also take care to tightly limit the dependencies on static |
| 31 libraries from outside of `//services`. Dependencies to large platform | 34 libraries from outside of `//services`. Dependencies to large platform |
| 32 layers like `//content`, `//chrome` or `//third_party/WebKit` must be avoided. | 35 layers like `//content`, `//chrome` or `//third_party/WebKit` must be avoided. |
| 33 | 36 |
| 34 ### Physical Packaging | 37 ## Physical Packaging |
| 35 | 38 |
| 36 Note that while it may be possible to build a discrete physical package (DSO) | 39 Note that while it may be possible to build a discrete physical package (DSO) |
| 37 for each service, products consuming these services may package them | 40 for each service, products consuming these services may package them |
| 38 differently, e.g. by combining them into a single package. | 41 differently, e.g. by combining them into a single package. |
| 39 | 42 |
| 40 ### Documentation | 43 ## Additional Documentation |
| 41 | 44 |
| 42 [High-level Design Doc](https://docs.google.com/document/d/15I7sQyQo6zsqXVNAlVd5
20tdGaS8FCicZHrN0yRu-oU) | 45 [High-level Design Doc](https://docs.google.com/document/d/15I7sQyQo6zsqXVNAlVd5
20tdGaS8FCicZHrN0yRu-oU) |
| 43 [Homepage](https://sites.google.com/a/chromium.org/dev/servicification) | |
| 44 | 46 |
| 45 ### Relationship to other top-level directories in // | 47 [Servicification Homepage](https://sites.google.com/a/chromium.org/dev/servicifi
cation) |
| 48 |
| 49 ## Relationship To Other Top-Level Directories |
| 46 | 50 |
| 47 Services can be thought of as integrators of library code from across the | 51 Services can be thought of as integrators of library code from across the |
| 48 Chromium repository, most commonly //base and //mojo (obviously) but for each | 52 Chromium repository, most commonly `//base` and `//mojo` (obviously) but for |
| 49 service also //components, //ui, etc in accordance with the functionality they | 53 each service also `//components`, `//ui`, *etc.* in accordance with the |
| 50 provide. | 54 functionality they provide. |
| 51 | 55 |
| 52 Not everything in //components is automatically a service in its own right. | 56 Not everything in `//components` is automatically a service in its own right. |
| 53 Think of //components as sort of like a //lib. Individual //components can | 57 Think of `//components` as sort of like a `//lib`. Individual `//components` can |
| 54 define, implement and use mojom interfaces, but only //services have unique | 58 define, implement and use Mojom interfaces, but only `//services` have unique |
| 55 identities with the Service Manager. | 59 identities with the Service Manager and so only `//services` make it possible |
| 60 for Mojom interfaces to be acquired. |
| 56 | 61 |
| 57 ### Adding a new service | 62 ## Adding a new service |
| 58 | 63 |
| 59 Please start a thread on [services-dev](https://groups.google.com/a/chromium.org
/forum/#!forum/services-dev) | 64 See the [Service Manager documentation](/services/service_manager) for more |
| 65 details regarding how to define a service and expose or consume interfaces to |
| 66 and from other services. |
| 60 | 67 |
| 68 Please start a thread on [services-dev@chromium.org](https://groups.google.com/a
/chromium.org/forum/#!forum/services-dev) |
| 69 if you want to introduce a new service. |
| OLD | NEW |