精神出轨是什么意思| 排骨汤什么时候放盐最好| 小腿疼痛什么原因引起的| 头晕脑胀吃什么药| 霜降出什么生肖| 518是什么星座| 烧仙草粉是什么做的| 心绞痛什么症状| 血崩是什么症状| 棉花糖是什么做的| 大便潜血阳性意味着什么| 尿偏红色是什么原因| 为什么现在不建议输液| epd是什么意思| 绿豆汤什么颜色| 什么是平板电脑| 炒菜用什么锅最好| 三七粉什么人不适合吃| 元武道是什么| 鹿晗和邓超什么关系| 乌黑对什么| m是什么牌子| 恋爱观是什么| 电测听是什么| 肝斑一般在脸上的什么地方| cor是什么意思| 自渎是什么意思| 早上起来嘴苦口臭是什么原因| 抑郁挂什么科| 法学是干什么的| 火同念什么| 广西属于什么方向| 拘泥是什么意思| 心脾两虚是什么意思| 为什么会得霉菌性阴道炎| 有核红细胞是什么意思| 吃白糖有什么好处和坏处| 习俗是什么意思| 淀粉酶偏高是什么原因| 五月十九日是什么星座| 9月10日是什么日子| 元春省亲为什么在晚上| 海兔是什么动物| 肾小球滤过率偏高说明什么| 命途多舛是什么意思| 化验痰可以检查出什么| 南昌有什么好玩的| 命悬一线的意思是什么| 星光是什么意思| 脚踝肿是什么原因| 车标是牛的是什么车| 小猫吃什么| 覆盆子是什么东西| 乳清蛋白是什么| 八月是什么星座| 恩怨是什么意思| 为什么要做试管婴儿| 前列腺炎挂什么科| 性早熟有什么症状| 256排ct能检查什么病| 反复低烧是什么原因| 高血压适合喝什么茶| 小孩自闭症有什么表现| 吃东西就吐是什么原因| 幕后是什么意思| 茶鱼是什么鱼| 一个虫一个离念什么| maxco是什么牌子| 手脚出汗是什么原因| 血红蛋白偏低吃什么补| 我战胜了什么| 耳鼻喉科主要看什么病| 宝宝发烧挂什么科| 杨桃长什么样| jasonwood是什么牌子| 容易淤青的体质叫什么| 中山市有什么大学| 第一次见女方家长带什么礼物好| 骨折吃什么药恢复快| 思觉失调是什么意思| 吃山竹有什么好处| 尿酸升高是什么原因| 查肝功能能查出什么病| 愣头青是什么意思| 过敏期间不能吃什么东西| 收割是什么意思| 感冒了吃什么药| 衍生物是什么意思| 甲状腺是什么| 驳是什么动物| 罗可以组什么词| journey是什么意思| 脚麻是什么原因造成的| 10月17是什么星座| qq黄钻有什么用| 什么是电信诈骗| 佛手瓜什么时候结果| 睾酮是什么| 一什么桌子| obl是什么意思| 尿分叉是什么原因| 头伏饺子二伏面三伏吃什么| 人为什么会做春梦| 司长什么级别| 胆囊壁稍毛糙是什么意思| 如如不动什么意思| 红色加蓝色是什么颜色| 一直打嗝是什么原因引起的| 唇炎去医院挂什么科| 偏头痛是什么原因引起的| 太虚是什么意思| k字开头是什么车| 88年属什么生肖| dell是什么牌子的电脑| 血沉高是什么病| 尿路感染吃什么药比较好的快| 点状血流信号是什么意思| 股票五行属什么| 为什么发际线高| 附件是什么部位| 耳鸣是什么病引起的| 琥珀是什么颜色| pab是什么意思| 七月一号是什么节| 农历12月26日是什么星座| 心肌酶高是什么原因| 心脏疼是什么感觉| 草口耳是什么字| 量词是什么意思| 京ag6是什么意思| 美国为什么叫鹰酱| 害怕的反义词是什么| 脑梗做什么检查| 墨子是什么家| 吃一个海参相当于吃了什么| 属虎的是什么命| 为什么感觉不到饿| 培根是什么肉做的| 女性腹部彩超检查什么| 恶心头晕是什么症状| 羊驼为什么吐口水| 痛经喝什么可以缓解| 唉声叹气是什么意思| rp是什么意思| 拉大便出血是什么原因| 月经期间适合吃什么食物| 下面流出发黄的液体是什么原因| 骨折不能吃什么东西| 弯的直的什么意思| 甲状腺密度不均匀是什么意思| 控诉是什么意思| 丝瓜为什么会变黑| 脚心烧是什么原因| 十月十日什么星座| 食欲不振是什么意思| 龟是什么意思| 小肚子疼是什么原因女性| 肛门潮湿用什么药最好| 你为什么背着我爱别人| 什么是县级市| nb是什么牌子| 什么东西补铁| 经常偏头疼是什么原因| 牙齿酸痛什么原因| 类风湿关节炎不能吃什么食物| 经常心慌是什么原因| 主治医师是什么级别| 左侧卵巢多囊样改变什么意思| 天天喝白酒对身体有什么危害| 吃什么排黑色素最强| 月季什么时候开花| 躁郁症吃什么药| 夕阳什么意思| 肺结核是什么病| 早上九点半是什么时辰| 干燥综合症是什么病| 元首是什么意思| 自闭症是什么意思| 为什么眼睛会红| 脂肪肝是什么| 豆腐炖什么好吃| 12颗珠子的手串什么意思| 吃什么可以增大阴茎| 软饮料是指什么| 胃萎缩是什么原因| 似乎的近义词是什么| 六月初六是什么节日| 保护嗓子长期喝什么茶| 皮神经炎是什么症状| mua什么意思| 护法是什么意思| 做nt挂什么科| 好巴适是什么意思| 癌前病变是什么意思| 鹅蛋脸适合什么样的发型| 婴儿便便是绿色的是什么原因| 眼球突出是什么原因| 味增是什么| 经常打饱嗝是什么原因| 晚上睡觉腿酸难受是什么原因| 肠胃镜挂什么科| 什么叫甲状腺| 女m是什么意思| 内分泌失调是什么症状| 不锈钢肥皂是什么原理| 60大寿送什么礼物| 产后第一次来月经是什么颜色| 吃什么开胃增加食欲| 心包隐窝是什么意思| 乐加是什么药| 马齿苋是什么| 保拉纳啤酒什么档次| 推头是什么意思| 身上到处痒是什么原因| 充电宝100wh是什么意思| 坎宅是什么意思| 嗓子疼吃什么水果好| 什么是溶血症| 敕令是什么意思| 西安什么山| 脑瘤到什么程度才会死| 糜烂性胃炎吃什么药效果好| 暴饮暴食会得什么病| 吃什么补脾| 11月8日是什么星座| 牛肉炒什么| 抬头纹开了是什么意思| 求租是什么意思| 什么食物养肝护肝最好| 2月7号是什么星座| 变质是什么意思| 印度尼西亚是什么人种| 蚕豆病是什么病有什么症状| 灵芝有什么好处| 莒姬是什么位分| esr是什么| 卧推100公斤什么水平| 梦见老鼠是什么预兆| 嗓子疼低烧吃什么药| 七夕节是什么意思| 尿道痒痒是什么原因| 公招是什么意思| 医学上cr是什么意思| 什么人不能吃香蕉| 芽轴发育成什么| 严重贫血的人吃什么补血最快| 脾脏结节一般是什么病| 1988属什么| 网调是什么意思| 闻名的闻什么意思| 肚子疼应该吃什么药| 振字五行属什么| ags是什么意思| 吃什么食物能升白细胞| 老梗是什么意思| 想入非非什么意思| 酗酒什么意思| 串词是什么| 噤若寒蝉是什么意思| 妮字五行属什么| 安装空调需要注意什么| 人为什么会抽筋| 深圳有什么好玩的地方| 恒牙是什么牙| 百度
tree: ef72f5c98f67c67d24a169bd7b3e1608124285f7 [path history] [tgz]
  1. accessibility/
  2. audio/
  3. cert_verifier/
  4. content/
  5. data_decoder/
  6. device/
  7. image_annotation/
  8. media_session/
  9. metrics/
  10. network/
  11. on_device_model/
  12. passage_embeddings/
  13. preferences/
  14. proxy_resolver/
  15. proxy_resolver_win/
  16. resource_coordinator/
  17. screen_ai/
  18. service_manager/
  19. services_strings_grd/
  20. shape_detection/
  21. strings/
  22. test/
  23. tracing/
  24. video_capture/
  25. video_effects/
  26. viz/
  27. webnn/
  28. BUILD.gn
  29. COMMON_METADATA
  30. DEPS
  31. DIR_METADATA
  32. OWNERS
  33. README.md
  34. services_strings.grd
services/README.md

袁隆平透露超级稻进展:17吨/公顷已有九成把握

Overview

百度 因此,在当前的中国,加强制度建设,要以治理官场“大忽悠”为最根本的着力点,不是看制定了多少新的制度规章,而是要加强制度的执行力建设。

The top-level //services directory contains the sources, public Mojo interface definitions, and public client libraries for a number of essential services, designated as Chrome Foundation Services. If you think of Chrome as a “portable OS,” Chrome Foundation Services can be thought of as the core system services of that OS.

Each subdirectory here corresponds to a service that:

  • generally focuses on a subset of functionality or features which are thematically or functionally related in a way that makes sense given the name of the service
  • could logically run in an isolated process for security or performance isolation, depending on the constraints of the host OS
Note that there are other parts of the tree which aggregate slightly-less-than-foundational service definitions, such as services specific to the Chrome browser defined in //chrome/services or reusable services for Content or its embedders, defined in //components/services. The motivations, advice, and standards discussed in this document apply to all service definitions in the Chromium tree.

One of the main motivations for expressing Chromium as a collection of services is long-term maintainability and code health. Because service API boundaries are strictly limited to Mojo interfaces, state owned and managed by each service is strongly isolated from other components in the system.

Another key motivation is general modularity and reusability: in the past there have been a number of missed opportunities for potential new features or Chromium-based products due to the browser's generally monolothic and inflexible system design. With the services providing scaffolding for system components, it becomes progressively easier to build out newer use cases with e.g. a smaller resource footprint, or a different process model, or even a more granular binary distribution.

Service Standards

As outlined above, individual services are intended for graceful reusability across a broad variety of use cases. To enable this goal, we have rigorous standards on services' structure and public API design. Before doing significant work in //services (or other places where services are defined), please internalize these standards. All Chromium developers are responsible for upholding them!

Public Service APIs

In creating and maintaining a service's public API, please respect the following principles:

  • The purpose of a service should be readily apparent.
  • The supported client use cases of the service should be easy for a new consumer to understand.
  • The service should use idioms and design patterns consistent with other services.
  • From the service‘s public API documentation and tests, it should be feasible to develop a new implementation of the service which satisfies existing clients and doesn’t require mimicking internal implementation details of the existing service.
  • Perhaps most important of all, a service's public API should be designed with multiple hypothetical clients in mind, not focused on supporting only a single narrow use known at development time. Always be thinking about the future!

If you‘re working on a new service and have concerns or doubts about API design, please post to services-dev@chromium.org and ask for help. The list is generally quite responsive, and it’s loaded with people who have done a lot of work on services.

Service API Design Tips

Using Interface Factories to Establish Context

One common pitfall when designing service APIs is to write something like:

interface GoatTeleporter {
  // Sets the client interface pipe for this teleporter. Must be called before
  // other interface methods.
  SetClient(GoatTeleporterClient client);

  TeleportGoat(string name);
};

interface GoatTeleporterClient {
  TeleporterReady();
};

The problem with this approach is that a client may easily fail to call SetClient before calling TeleportGoat. When such ordering requirements are necessary, the service can benefit clients by designing an API that is harder to fail at. For example:

interface GoatTeleporterFactory {
  GetGoatTeleporter(GoatTeleporter& request, GoatTeleporterClient client);
};

interface GoatTeleporter {
  TeleportGoat(string name);
};

Instead of exposing GoatTeleporter directly to other services, the service can expose GoatTeleporterFactory instead. Now it's impossible for a client to acquire a functioning GoatTeleporter pipe without also providing a corresponding client pipe to complement it.

Interface Naming

Just some basic tips for service and interface naming:

  • Strive to give your service's main interface a name that directly conveys the general purpose of the service (e.g., NetworkService, StorageService) rather than a meaningless codename like Cromulator.

  • Strive to avoid conceptual layering violations in naming and documentation -- e.g., avoid referencing Blink or Content concepts like “renderers” or “frame hosts”.

  • Use the names FooClient and FooObserver consistently in interfaces. If there is an expected 1:1 correspondence between a Foo and its client interface counterpart, that counterpart should most likely be called FooClient. If there is expected to be 1-to-many correspondence between a Foo and its counterpart clients, the client interface may be better named FooObserver.

Service Directory & Dependency Structure

Services typically follow a canonical directory structure:

//services/service_name/               # Private implementation
                        public/
                               mojom/  # Mojom interfaces
                               cpp/    # C++ client libraries (optional)
                               java/   # Java client libararies (optional, rare)
                               js/     # JS client libraries (optional, rare)

As a general rule, nothing below /public can depend on the private service implementation (i.e. things above /public). Enforcing this principle makes it much easier to keep the service's state well-isolated from the rest of the system.

Generally the language-specific client libraries are built against only the public mojom API of the service (and usually few other common dependencies like //base and //mojo).

Even in the private service implementation, services should not depend on very large components like Content, Chrome, or Blink.

NOTE: Exceptions to the above rule are made in rare cases where Blink or V8 is actually required as part of the service implementation. For example "data_decoder" uses Blink implementation to decode common image formats, and "proxy_resolver" uses V8 to execute proxy autoconfig scripts.

Service Documentation

  • Every service should have a top-level README.md that explains the purpose and supported usage models of the service.

  • Every public interface should be documented within its Mojom file at both the interface level and indivudal message level.

  • Interface documentation should be complete enough to serve as test specifications. If the method returns information of a user's accounts, what should happen if the user is not signed in? If the method makes a request for an access token, what happens if a client makes a second method call before the first one has completed? If the method returns a nullable object, under which conditions will it be null?

  • Avoid writing interface documentation which is unnecessarily prescriptive about implementation details. Keep in mind that these are interface definitions, not implementations thereof.

  • Avoid writing documentation which is tailored to a specific client.

Service Testing

  • Try to cover service implementation details with unit tests tied as closely as possible to the private implementation object or method being tested, rather than exercising implementation details through public API surface.

  • For integration tests, try to have tests cover as much of the public API surface as possible while mocking out as little of the underlying service as possible.

  • Treat the public API tests as “conformance tests” which clearly demonstrate what expectations and guarantees are supposed to be upheld by any implementation of the service's APIs.

Adding a New Service

Please start a thread on services-dev@chromium.org if you want to propose the introduction of a new service.

If you are servicifying an existing Chromium feature, please check out Servicifying Chromium Features.

Other Docs

Here are some other external documents that aren't quite fully captured by any documents in the Chromium tree. Beware of obsolete information:

Additional Support

You can always post to services-dev@chromium.org with questions or concerns about anything related to service development.

高血压什么症状表现 美缝什么时候做 大象又什么又什么 大腿为什么会长妊娠纹 女性尿道口有小疙瘩是什么原因
白玉是什么玉 长时间憋尿会有什么影响 牛黄清心丸治什么病 lmp医学上什么意思 尿酸高吃什么药效果好
死后是什么感觉 61年属什么生肖 想法是什么意思 诗韵是什么意思 肚脐眼位置疼是什么原因
银屑病为什么会自愈 来大姨妈喝什么汤比较好 核磁dwi是什么意思 川字五行属什么 修造是什么意思
阴唇为什么一大一小hcv8jop7ns7r.cn 伐木是什么意思hcv9jop2ns4r.cn 什么是复韵母hcv7jop6ns6r.cn 胆红素三个指标都高是什么原因hcv8jop9ns2r.cn rbc是什么意思hcv8jop3ns5r.cn
什么是好词hcv8jop1ns6r.cn 什么是长孙hcv9jop6ns0r.cn 云南白药有什么功效hcv8jop4ns1r.cn 椎间盘轻度膨出是什么意思hcv9jop1ns4r.cn 聊天是什么意思hcv9jop6ns8r.cn
白癜风是什么症状aiwuzhiyu.com 合拢是什么意思hcv9jop6ns0r.cn left是什么意思sanhestory.com 塬字五行属什么bjcbxg.com 什么时候三伏天cl108k.com
肝血管瘤是什么病hcv9jop4ns3r.cn 什么是沉香木hcv9jop2ns9r.cn 儿童用什么洗发水好xscnpatent.com 一桌餐是什么意思hkuteam.com 急性痛风吃什么药hcv7jop7ns4r.cn
百度