• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

installer_policies/H16-Feb-2021-442310

BUILD.gnH A D16-Feb-20212 KiB8677

DEPSH A D16-Feb-2021164 98

OWNERSH A D16-Feb-2021125 64

README.mdH A D16-Feb-20214 KiB8366

component_installer.ccH A D16-Feb-202116 KiB449351

component_installer.hH A D16-Feb-20217.8 KiB19394

component_installer_unittest.ccH A D16-Feb-202114.4 KiB408322

component_updater_command_line_config_policy.ccH A D16-Feb-20214.3 KiB13587

component_updater_command_line_config_policy.hH A D16-Feb-20211.6 KiB5333

component_updater_paths.ccH A D16-Feb-20213.2 KiB9368

component_updater_paths.hH A D16-Feb-20212.8 KiB5521

component_updater_service.ccH A D16-Feb-202116.3 KiB483373

component_updater_service.hH A D16-Feb-20217.8 KiB20097

component_updater_service_internal.hH A D16-Feb-20214.8 KiB13481

component_updater_service_unittest.ccH A D16-Feb-202115.8 KiB438349

component_updater_switches.ccH A D16-Feb-2021443 144

component_updater_switches.hH A D16-Feb-2021593 176

component_updater_url_constants.ccH A D16-Feb-2021880 247

component_updater_url_constants.hH A D16-Feb-2021661 219

configurator_impl.ccH A D16-Feb-20213.8 KiB13799

configurator_impl.hH A D16-Feb-20213.5 KiB11152

configurator_impl_unittest.ccH A D16-Feb-20216.6 KiB180138

crl_set_remover.ccH A D16-Feb-2021756 2314

crl_set_remover.hH A D16-Feb-2021564 209

mock_component_updater_service.ccH A D16-Feb-2021444 145

mock_component_updater_service.hH A D16-Feb-20212.1 KiB6344

pref_names.ccH A D16-Feb-20211.9 KiB4817

pref_names.hH A D16-Feb-2021934 3218

timer.ccH A D16-Feb-20211.1 KiB4629

timer.hH A D16-Feb-2021929 4326

timer_unittest.ccH A D16-Feb-20211.8 KiB6950

timer_update_scheduler.ccH A D16-Feb-2021977 3020

timer_update_scheduler.hH A D16-Feb-20211.1 KiB3823

update_scheduler.hH A D16-Feb-20211.6 KiB4020

README.md

1# Component Updater
2
3[TOC]
4
5## Overview
6The Component Updater is a piece of Chrome responsible for updating other pieces
7of Chrome. It runs in the browser process and communicates with a set of servers
8using the [Omaha](https://github.com/google/omaha) protocol to find the latest
9versions of components, download them, and register them with the rest of
10Chrome.
11
12The primary benefit of components is that they can be updated without an update
13to Chrome itself, which allows them to have faster (or desynchronized) release
14cadences, lower bandwidth consumption, and avoids bloat in the (already sizable)
15Chrome installer. The primary drawback is that they require Chrome to tolerate
16their absence in a sane way.
17
18In the normal configuration, the component updater registers all components
19during (or close to) browser start-up, and then begins checking for updates six
20minutes later, with substantial pauses between successive update application.
21
22## Terminology
23For the purposes of this document:
24
25 * A `component` is any element of Chrome's core functionality that is sometimes
26   delivered by the component updater separately from the browser itself,
27   usually as a dynamically-linked library or data file.
28 * A `crx file` is any file in the
29   [CRX package format](../crx_file/README.md).
30
31## Adding New Components
32This document covers the work that must be done on the client side. Additional
33work is necessary to integrate with the Omaha servers, and is covered in
34[Google-internal documentation](http://go/newchromecomponent).
35
36This assumes you've already done the hard work of splitting your functionality
37out into a dynamically-linked library or data file.
38
39### Create a CRX Package Signing Key & Manifest (Non-Google)
40All components are delivered as CRX files (signed ZIP archives). You need to
41create a signing key. If you are a Googler, follow the instructions at
42http://go/newchromecomponent for maximum key security. Otherwise, you can
43create an RSA key pair using `openssl` or a similar tool.
44
45You will additionally need to create a manifest.json file. If nothing else, the
46manifest file must specify the component's version and name. If you plan to
47release the component using Google infrastructure, this file can be generated
48for you automatically.
49
50### Writing an Installer
51The "installer" is a piece of Chrome code that the component updater will run to
52install or update the component. Installers live at
53`src/chrome/browser/component_updater`.
54
55You will need the SHA256 hash of the public key generated in the previous step,
56as well as the CRX ID, which consists of the first half (128 bits) of that hash,
57rendered as hexadecimal using the characters `a-p` (rather than `0-9a-f`).
58
59New components should use
60[`component_installer`](component_installer.h)
61if possible, as this provides you with transparent differential updates, version
62management, and more. You must provide a `ComponentInstallerPolicy` object to
63a new `ComponentInstaller`.
64[file\_type\_policies\_component\_installer.cc](../../chrome/browser/component_updater/file_type_policies_component_installer.cc)
65is a good example to work from.
66
67Components need to be registered with the component updater. This is done in
68[RegisterComponentsForUpdate](https://cs.chromium.org/chromium/src/chrome/browser/chrome_browser_main.cc).
69
70### Bundle with the Chrome Installer (Optional)
71If you need the guarantee that some implementation of your component is always
72available, you must bundle a component implementation with the browser itself.
73If you are using `ComponentInstaller`, you simply need to make sure that
74your component implementation (and a corresponding manifest.json file) are
75written to DIR\_COMPONENTS as part of the build. The manifest.json file must
76state the version of this component implementation, and the files must be
77bitwise identical to the contents of any update CRX with that version for that
78platform, as the system will attempt to apply differential updates over these
79files.
80
81### Implement On-Demand or Just-In-Time Updates (Optional)
82Contact the component\_updater OWNERS.
83