zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 1 | # Adding third_party Libraries |
| 2 | |
| 3 | [TOC] |
| 4 | |
| 5 | Using third party code can save time and is consistent with our values - no need |
| 6 | to reinvent the wheel! We put all code that isn't written by Chromium developers |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 7 | into `//third_party` (even if you end up modifying just a few functions). We do |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 8 | this to make it easy to track license compliance, security patches, and supply |
| 9 | the right credit and attributions. It also makes it a lot easier for other |
| 10 | projects that embed our code to track what is Chromium licensed and what is |
| 11 | covered by other licenses. |
| 12 | |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 13 | ## Put the code in //third_party |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 14 | |
Lei Zhang | f1c7392 | 2024-05-13 19:17:44 | [diff] [blame] | 15 | By default, all third party code should be checked into |
Dirk Pranke | 53e12c3 | 2024-09-12 20:55:18 | [diff] [blame] | 16 | [//third_party](../third_party/), for the reasons given above. |
| 17 | |
| 18 | There is one primary exception to this, which is that if a third_party |
| 19 | dependency has its own dependencies *and* it can be built on its own (without |
| 20 | Chromium), you can check its dependencies into its third_party. For example, |
| 21 | Dawn is a project that is developed independently of Chromium, and |
| 22 | it has a dependency on GLFW (which Chromium does not have). Dawn |
| 23 | can check that dependency into its `//third_party/glfw`, and in a Chromium |
| 24 | checkout, that will show up at `//third_party/dawn/third_party/glfw`. |
| 25 | That is okay, but it'd be better if we could add GLFW to a Chromium |
| 26 | checkout (in chromium/src's `third_party/glfw`) and configure Dawn |
| 27 | to use that location when it is being built as part of Chromium. |
| 28 | |
| 29 | However, if that dependency is also needed by Chromium or another |
| 30 | of Chromium's dependencies, then it must be checked out into Chromium's |
| 31 | //third_party (i.e., now you have to use `//third_party/glfw`). This |
| 32 | prevents us from possibly needing to use two different versions of a |
| 33 | dependency. |
| 34 | |
| 35 | Apart from that, other locations are only appropriate in a few |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 36 | situations and need explicit approval; don't assume that because there's some |
| 37 | other directory with third_party in the name it's okay to put new things |
| 38 | there. |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 39 | |
Tim van der Lippe | 5870ac3 | 2019-10-18 11:46:54 | [diff] [blame] | 40 | ## Before you start |
| 41 | |
| 42 | To make sure the inclusion of a new third_party project makes sense for the |
Alex Mineer | 5576433 | 2022-02-25 18:05:19 | [diff] [blame] | 43 | Chromium project, you should first obtain |
John Abd-El-Malek | 704bca0 | 2022-12-14 18:47:59 | [diff] [blame] | 44 | [Chrome ATL](../ATL_OWNERS) approval. Please include the following information in an |
John Abd-El-Malek | f44dc07b | 2023-02-07 02:39:11 | [diff] [blame] | 45 | email to chrome-atls-discuss@google.com: |
Yaron Friedman | e3427139 | 2022-04-29 16:45:53 | [diff] [blame] | 46 | * Motivation of your project |
| 47 | * Design docs |
| 48 | * Additional checkout size |
John Abd-El-Malek | dde7f23 | 2022-12-14 23:41:50 | [diff] [blame] | 49 | * If the increase is significant (e.g., 20+ MB), can we consider limiting the |
| 50 | files to be checked in? |
Yaron Friedman | e3427139 | 2022-04-29 16:45:53 | [diff] [blame] | 51 | * Build time increase |
Erik Staab | 6e341e8 | 2024-08-26 15:13:35 | [diff] [blame] | 52 | * This refers to building `chrome` or test targets in the critical |
| 53 | development path. |
John Abd-El-Malek | dde7f23 | 2022-12-14 23:41:50 | [diff] [blame] | 54 | * If the increase is significant (e.g., 30+ seconds), can we consider making |
| 55 | this an optional build target? |
| 56 | * Binary size increase on Android ([official](https://www.chromium.org/developers/gn-build-configuration) builds) |
Lei Zhang | f1c7392 | 2024-05-13 19:17:44 | [diff] [blame] | 57 | * Any increase of 16 KB or more on Android is flagged on the build bots and |
John Abd-El-Malek | dde7f23 | 2022-12-14 23:41:50 | [diff] [blame] | 58 | justification is needed. |
Yaron Friedman | e3427139 | 2022-04-29 16:45:53 | [diff] [blame] | 59 | * Binary size increase on Windows |
John Abd-El-Malek | dde7f23 | 2022-12-14 23:41:50 | [diff] [blame] | 60 | * Is this library maintained on all platforms that we will use it on? |
| 61 | * If not, will the Chrome org be expected to maintain this for some or all |
| 62 | platforms? |
| 63 | * Does it have any performance / memory implications (esp. on Android)? Was the |
| 64 | library designed with intended use on Android? |
| 65 | * Do we really need the library? Is there any alternative such as an existing |
| 66 | library already in Chromium? If introducing a library with similar functionality |
| 67 | as existing, will it be easy for another developer to understand which should be |
| 68 | used where? Will you commit to consolidating uses in Chromium and remove the |
| 69 | alternative libraries? |
| 70 | * For desktop (Win/Mac/Linux/ChromeOS), does the dependency introduce closed |
| 71 | source components (e.g., binaries, WASM binaries, obfuscated code)? If yes, |
| 72 | please reach out to Chrome ATLs. |
| 73 | |
Yaron Friedman | e3427139 | 2022-04-29 16:45:53 | [diff] [blame] | 74 | |
John Abd-El-Malek | 704bca0 | 2022-12-14 18:47:59 | [diff] [blame] | 75 | Googlers can access [go/chrome-atls](https://goto.google.com/chrome-atls) and review |
| 76 | existing topics in g/chrome-atls, and can also come to office hours to ask |
Alex Mineer | 5576433 | 2022-02-25 18:05:19 | [diff] [blame] | 77 | questions. |
| 78 | |
Scott Violet | 50a02e4 | 2022-11-29 20:02:34 | [diff] [blame] | 79 | ### Rust |
| 80 | |
David Adrian | d891869 | 2024-12-12 22:02:50 | [diff] [blame^] | 81 | Rust is allowed for third party libraries. Unlike C++ libraries, Rust third |
| 82 | party libraries are [regularly rolled to updated versions by a |
| 83 | rotation](https://chromium.googlesource.com/chromium/src/tools/+/HEAD/crates/create_update_cl.md) |
| 84 | and can be audited for unsafety. The process for adding a Googler adding new Rust third-party |
| 85 | dependencies is documented at go/chrome-rust. External contributors adding a new |
| 86 | third party Rust dependency will be shepherded through the process as part of |
| 87 | their ATL review. |
Scott Violet | 50a02e4 | 2022-11-29 20:02:34 | [diff] [blame] | 88 | |
David Adrian | d891869 | 2024-12-12 22:02:50 | [diff] [blame^] | 89 | Email rust-dev@chromium.org with any questions about the Rust toolchain. |
Scott Violet | 50a02e4 | 2022-11-29 20:02:34 | [diff] [blame] | 90 | |
Yaron Friedman | e3427139 | 2022-04-29 16:45:53 | [diff] [blame] | 91 | ### A note on size constraints |
| 92 | |
| 93 | The size of Chromium derived executables can impact overall performance of those binaries as they |
| 94 | need to run on a wide range of devices including those with extremely limited RAM. Additionally, we |
| 95 | have experience from Windows of the binary size impacting successful patch rate of updates as well |
| 96 | as constraints from the Android Ecosystem where APKs included in the system image have hard |
| 97 | limits on their size due to allocation size of the system partition. For more details and |
| 98 | guidelines on size increases see |
Michael Cui | 5d51775 | 2022-11-01 14:11:32 | [diff] [blame] | 99 | [//docs/speed/binary_size/binary_size_explainer.md](speed/binary_size/binary_size_explainer.md) and Googlers can |
| 100 | additionally check [go/chrome-binary-size](https://goto.google.com/chrome-binary-size) |
Tim van der Lippe | 5870ac3 | 2019-10-18 11:46:54 | [diff] [blame] | 101 | |
Rachael Newitt | 1554699 | 2023-09-17 22:13:09 | [diff] [blame] | 102 | ### Binaries, obfuscated or minified code |
| 103 | |
| 104 | The addition of third-party dependencies that contain binaries, obfuscated |
| 105 | code, or minified code is strongly discouraged. Code review is an important |
| 106 | part of reducing risk to Chromium and a reviewer asked to approve a change |
| 107 | that contains any of these has no way to determine the legitimacy of what |
| 108 | they are approving. Minification for performance optimization is |
| 109 | [usually not necessary](speed/binary_size/optimization_advice.md), and the |
| 110 | trade-off in terms of understandability and security is rarely worth |
| 111 | it. |
| 112 | |
| 113 | Where your dependency will form part of a release binary where size is a concern, |
| 114 | there are existing tools which handle [compression for distribution](speed/binary_size/optimization_advice.md). |
| 115 | |
| 116 | You should not check in any pre-built binaries where there is an alternate, |
| 117 | supported solution for getting them. If you need to compile from source, |
| 118 | consider using [CIPD](cipd_and_3pp.md) instead. |
| 119 | |
Dirk Pranke | 4038090a | 2024-05-09 01:51:37 | [diff] [blame] | 120 | This is accessible to Googlers only. Non-Googlers can email one of the people |
| 121 | in third_party/OWNERS for help. |
Rachael Newitt | 1554699 | 2023-09-17 22:13:09 | [diff] [blame] | 122 | |
| 123 | See [Chrome Code Policy](https://goto.google.com/chrome-code-policy) |
| 124 | |
| 125 | |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 126 | ## Get the code |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 127 | |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 128 | There are two common ways to depend on third-party code: you can reference a |
Jason D. Clinton | b21e99b | 2021-09-30 19:19:58 | [diff] [blame] | 129 | Git repo directly (via entries in the DEPS file) or you can check in a |
| 130 | snapshot. The former is preferable in most cases: |
| 131 | |
| 132 | 1. If you are actively developing in the upstream repo, then having the DEPS |
| 133 | file include the upstream (that's been mirrored to GoB, see below) can be a |
| 134 | way to include those changes into Chromium at a particular revision. The |
| 135 | DEPS file will be updated to a new revision when you are ready to "roll" the |
| 136 | new version into Chromium. This also avoids duplicate copies of the code |
| 137 | showing up in multiple repos leading to contributor confusion. |
| 138 | 1. This interacts favorably with our upstream tracking automation. We |
| 139 | automatically consume the upstream Git hashes and match them against a |
| 140 | database of known upstreams to tracking drift between Chromium and upstream |
| 141 | sources. |
| 142 | 1. This makes adding deps that don't need local changes easier. E.g. some of |
| 143 | our automation automatically converts non-GN build rules into GN build rules |
| 144 | without any additional CLs. |
| 145 | |
| 146 | Checking in a snapshot is useful if this is effectively taking on maintenance |
| 147 | of an unmaintained project (e.g. an ancient library that we're going to GN-ify |
| 148 | that hasn't been updated in years). And, of course, if the code you need isn't |
| 149 | in a Git repo, then you have to snapshot. |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 150 | |
Tim van der Lippe | 5870ac3 | 2019-10-18 11:46:54 | [diff] [blame] | 151 | ### Node packages |
| 152 | |
| 153 | To include a Node package, add the dependency to the |
| 154 | [Node package.json](../third_party/node/package.json). Make sure to update |
| 155 | the corresponding [`npm_exclude.txt`](../third_party/node/npm_exclude.txt) |
| 156 | and [`npm_include.txt`](../third_party/node/npm_include.txt) to make the code |
| 157 | available during checkout. |
| 158 | |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 159 | ### Pulling the code via DEPS |
| 160 | |
| 161 | If the code is in a Git repo that you want to mirror, please file an [infra git |
| 162 | ticket](https://bugs.chromium.org/p/chromium/issues/entry?template=Infra-Git) |
| 163 | to get the repo mirrored onto chromium.googlesource.com; we don't allow direct |
| 164 | dependencies on non-Google-hosted repositories, so that we can still build |
Jason D. Clinton | b21e99b | 2021-09-30 19:19:58 | [diff] [blame] | 165 | if an external repository goes down. |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 166 | |
| 167 | Once the mirror is set up, add an entry to [//DEPS](../DEPS) so that gclient |
| 168 | will pull it in. If the code is only needed on some platforms, add a condition |
| 169 | to the deps entry so that developers on other platforms don't pull in things |
| 170 | they don't need. |
| 171 | |
| 172 | As for specifying the path where the library is fetched, a path like |
| 173 | `//third_party/<project_name>/src` is highly recommended so that you can put |
| 174 | the file like OWNERS or README.chromium at `//third_party/<project_name>`. If |
| 175 | you have a wrong path in DEPS and want to change the path of the existing |
| 176 | library in DEPS, please ask the infrastructure team before committing the |
| 177 | change. |
| 178 | |
David Dorwin | 7fde299b | 2020-09-25 02:10:34 | [diff] [blame] | 179 | Lastly, add the new directory to Chromium's `//third_party/.gitignore`, so that |
| 180 | it won't show up as untracked files when you run `git status` on the main |
| 181 | repository. |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 182 | |
| 183 | ### Checking in the code directly |
| 184 | |
| 185 | If you are checking in a snapshot, please describe the source in the |
| 186 | README.chromium file, described below. For security reasons, please retrieve |
| 187 | the code as securely as you can, using HTTPS and GPG signatures if available. |
| 188 | If retrieving a tarball, please do not check the tarball itself into the tree, |
| 189 | but do list the source and the SHA-512 hash (for verification) in the |
| 190 | README.chromium and Change List. The SHA-512 hash can be computed via |
| 191 | `sha512sum` or `openssl dgst -sha512`. If retrieving from a git |
| 192 | repository, please list the revision that the code was pulled from. |
| 193 | |
| 194 | If you are checking the files in directly, you do not need an entry in DEPS |
David Dorwin | 7fde299b | 2020-09-25 02:10:34 | [diff] [blame] | 195 | and do not need to modify `//third_party/.gitignore`. |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 196 | |
| 197 | ### Checking in large files |
| 198 | |
Dirk Pranke | 4038090a | 2024-05-09 01:51:37 | [diff] [blame] | 199 | This is accessible to Googlers only. Non-Googlers can email one of the people |
| 200 | in third_party/OWNERS for help. |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 201 | |
| 202 | See [Moving large files to Google Storage](https://goto.google.com/checking-in-large-files) |
| 203 | |
| 204 | ## Document the code's context |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 205 | |
| 206 | ### Add OWNERS |
| 207 | |
Dirk Pranke | 6d3bb8e | 2024-05-09 00:54:33 | [diff] [blame] | 208 | Your OWNERS file must either list the email addresses of two Chromium |
| 209 | committers on the first two lines or include a `file:` directive to an OWNERS |
| 210 | file within the `third_party` directory that itself conforms to this criterion. |
| 211 | This will ensure accountability for maintenance of the code over time. While |
| 212 | there isn't always an ideal or obvious set of people that should go in OWNERS, |
| 213 | this is critical for first-line triage of any issues that crop up in the code. |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 214 | |
| 215 | As an OWNER, you're expected to: |
| 216 | |
| 217 | * Remove the dependency when/if it is no longer needed |
| 218 | * Update the dependency when a security or stability bug is fixed upstream |
| 219 | * Help ensure the Chrome feature that uses the dependency continues to use the |
| 220 | dependency in the best way, as the feature and the dependency change over |
| 221 | time. |
| 222 | |
| 223 | ### Add a README.chromium |
| 224 | |
| 225 | You need a README.chromium file with information about the project from which |
| 226 | you're re-using code. See |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 227 | [//third_party/README.chromium.template](../third_party/README.chromium.template) |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 228 | for a list of fields to include. A presubmit check will check this has the right |
| 229 | format. |
| 230 | |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 231 | README.chromium files contain a field indicating whether the package is |
| 232 | security-critical or not. A package is security-critical if it is compiled |
| 233 | into the product and does any of the following: |
| 234 | |
| 235 | * Accepts untrustworthy inputs from the internet |
| 236 | * Parses or interprets complex input formats |
| 237 | * Sends data to internet servers |
| 238 | * Collects new data |
| 239 | * Influences or sets security-related policy (including the user experience) |
| 240 | |
Rachael Newitt | fc2e334 | 2023-07-04 23:07:31 | [diff] [blame] | 241 | **CPE Prefix** |
Adrian Taylor | 0a06ec3 | 2020-03-03 05:00:07 | [diff] [blame] | 242 | One of the fields is CPEPrefix. This is used by Chromium and Google systems to |
| 243 | spot known upstream security vulnerabilities, and ensure we merge the fixes |
| 244 | into our third-party copy. These systems are not foolproof, so as the OWNER, |
| 245 | it's up to you to keep an eye out rather than solely relying on these |
| 246 | automated systems. But, adding CPEs decreases the chances of us missing |
| 247 | vulnerabilities, so they should always be added if possible. |
| 248 | |
| 249 | The CPE is a common format shared across the industry; you can look up the CPE |
Anne Redulla | 04f9197 | 2023-08-31 04:09:19 | [diff] [blame] | 250 | for your package [here](https://nvd.nist.gov/products/cpe/search). |
| 251 | * Use CPE format 2.3 (preferred) or CPE format 2.2 (supported). |
| 252 | * If the CPE uses the 2.3 URI binding or 2.2 format (i.e. starts with "cpe:/"), |
| 253 | and no version is explicitly specified within the `CPEPrefix`, the `Version` |
| 254 | in the `README.chromium` file will be appended to the `CPEPrefix`, if available. |
| 255 | * Note: if the `Version` field is set to a git hash value, version matching |
| 256 | for vulnerabilities will fail. |
| 257 | |
| 258 | When searching for a CPE, you may find that there is not yet a CPE for the |
| 259 | specific upstream version you're using. This is normal, as CPEs are typically |
| 260 | allocated only when a vulnerability is found. You should follow the version |
| 261 | number convention such that, when that does occur in future, we'll be notified. |
| 262 | If no CPE is available, please specify "unknown". |
Adrian Taylor | 0a06ec3 | 2020-03-03 05:00:07 | [diff] [blame] | 263 | |
Adrian Taylor | 8e0d3fd | 2020-04-17 20:14:25 | [diff] [blame] | 264 | If you're using a patched or modified version which is halfway between two |
| 265 | public versions, please "round downwards" to the lower of the public versions |
| 266 | (it's better for us to be notified of false-positive vulnerabilities than |
| 267 | false-negatives). |
Adrian Taylor | 0a06ec3 | 2020-03-03 05:00:07 | [diff] [blame] | 268 | |
Rachael Newitt | fc2e334 | 2023-07-04 23:07:31 | [diff] [blame] | 269 | |
| 270 | **Shipped** |
| 271 | Your README.chromium should also specify whether your third party dependency |
| 272 | will be shipped as part of a final binary. The "Shipped" field replaces the now |
| 273 | deprecated special value of "NOT_SHIPPED" which was previously allowed in the |
Rachael Newitt | f3531fd | 2024-09-26 03:37:41 | [diff] [blame] | 274 | "License File" field. This use is no longer supported and all third party |
| 275 | dependencies must include a valid license regardless of whether it is shipped |
| 276 | or not. |
Rachael Newitt | fc2e334 | 2023-07-04 23:07:31 | [diff] [blame] | 277 | |
| 278 | |
Anne Redulla | b75419e | 2023-09-12 03:34:01 | [diff] [blame] | 279 | **Multiple packages** |
| 280 | Each package should have its own README.chromium. However, if this is not |
| 281 | possible and the information for multiple packages must be placed in a single |
| 282 | README.chromium, use the below line to separate the data for each package: |
| 283 | ``` |
| 284 | -------------------- DEPENDENCY DIVIDER -------------------- |
| 285 | ``` |
| 286 | |
| 287 | |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 288 | ### Add a LICENSE file and run related checks |
| 289 | |
| 290 | You need a LICENSE file. Example: |
Rachael Newitt | f3531fd | 2024-09-26 03:37:41 | [diff] [blame] | 291 | [//third_party/libjpeg/LICENSE](../third_party/libjpeg/LICENSE). Dependencies |
| 292 | should not be added without a license file and license type, even if they are |
| 293 | not shipped in a final product. Existing dependencies without a license file or |
| 294 | license type are currently being cleaned up as part of the metadata uplift |
| 295 | effort. If you are an OWNER of a dependency missing license fields, there will |
| 296 | soon be a bug filed to fix it. |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 297 | |
Andrew Mellen | 2be00b9 | 2022-11-11 16:38:42 | [diff] [blame] | 298 | Run `//tools/licenses/licenses.py scan`; this will complain about incomplete or missing |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 299 | data for third_party checkins. We use `licenses.py credits` to generate the |
| 300 | about:credits page in Google Chrome builds. |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 301 | |
| 302 | If the library will never be shipped as a part of Chrome (e.g. build-time tools, |
Rachael Newitt | fc2e334 | 2023-07-04 23:07:31 | [diff] [blame] | 303 | testing tools), make sure to set the "Shipped" field to "no" so that the license |
Rachael Newitt | 1554699 | 2023-09-17 22:13:09 | [diff] [blame] | 304 | is not included in about:credits page ([more on this below](#credits)). |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 305 | |
Jordan Brown | 77ce40f | 2024-12-10 00:31:13 | [diff] [blame] | 306 | When a dependency allows a choice of license, OWNERS should choose the least |
| 307 | restrictive license that meets Chromium's needs and document only the chosen |
| 308 | license(s) in the README.chromium file. |
| 309 | |
| 310 | Multiple licenses apply when there are dependencies bundled together, or |
| 311 | different parts have different restrictions, these are inherently 'and'. This is |
| 312 | very different to a project allowing multiple license options. |
| 313 | |
| 314 | The license field in README.chromium must use a _comma-separated list_ of licenses |
| 315 | that are actively in use. Complex license expressions are not allowed or |
| 316 | supported. |
| 317 | |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 318 | ## Get a review |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 319 | |
Aaron Gable | fc8cdad | 2018-01-16 21:02:40 | [diff] [blame] | 320 | All third party additions and substantive changes like re-licensing need the |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 321 | following sign-offs. Some of these are accessible to Googlers only. |
| 322 | Non-Googlers can email one of the people in |
| 323 | [//third_party/OWNERS](../third_party/OWNERS) for help. |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 324 | |
John Abd-El-Malek | 704bca0 | 2022-12-14 18:47:59 | [diff] [blame] | 325 | * Make sure you have the approval from Chrome ATLs as mentioned |
Tim van der Lippe | 8c749839 | 2019-10-28 12:21:04 | [diff] [blame] | 326 | [above](#before-you-start). |
Alex Rudenko | f712a7f | 2022-02-23 17:55:36 | [diff] [blame] | 327 | * Get [email protected] (or [email protected], Google-only) |
| 328 | approval. Email the list with relevant details and a link to the CL. |
| 329 | Third party code is a hot spot for security vulnerabilities. |
Aaron Gable | fc8cdad | 2018-01-16 21:02:40 | [diff] [blame] | 330 | When adding a new package that could potentially carry security risk, make |
| 331 | sure to highlight risk to [email protected]. You may be asked to add |
| 332 | a README.security or, in dangerous cases, README.SECURITY.URGENTLY file. |
Dirk Pranke | 6fb90c0 | 2018-10-17 02:02:20 | [diff] [blame] | 333 | * Add [email protected] as a reviewer on your change. This |
Adam Langley | 88658b3 | 2018-11-20 22:12:47 | [diff] [blame] | 334 | will trigger an automatic round-robin assignment to a reviewer who will check |
| 335 | licensing matters. These reviewers may not be able to +1 a change so look for |
| 336 | verbal approval in the comments. (This list does not receive or deliver |
| 337 | email, so only use it as a reviewer, not for other communication. Internally, |
Michael Cui | 5d51775 | 2022-11-01 14:11:32 | [diff] [blame] | 338 | see [cl/221704656](http://cl/221704656) for details about how |
Dirk Pranke | f743281 | 2020-06-10 22:38:20 | [diff] [blame] | 339 | this is configured.). If you have questions about the third-party process, |
| 340 | ask one of the [//third_party/OWNERS](../third_party/OWNERS) instead. |
Adam Langley | 88658b3 | 2018-11-20 22:12:47 | [diff] [blame] | 341 | * Lastly, if all other steps are complete, get a positive code review from a |
| 342 | member of [//third_party/OWNERS](../third_party/OWNERS) to land the change. |
zpeng | 8d6f584a | 2016-12-16 20:50:28 | [diff] [blame] | 343 | |
John Abd-El-Malek | 704bca0 | 2022-12-14 18:47:59 | [diff] [blame] | 344 | Please send separate emails to the ATLs and [email protected]. |
| 345 | You can skip the ATL review and [email protected] when you are only moving |
Kentaro Hara | cd32834 | 2022-02-25 08:25:44 | [diff] [blame] | 346 | existing directories in Chromium to //third_party/. |
jochen | 893d518 | 2017-01-31 22:01:49 | [diff] [blame] | 347 | |
Dirk Pranke | 568e95c | 2018-11-01 23:41:50 | [diff] [blame] | 348 | Subsequent changes don't normally require third-party-owners or security |
| 349 | approval; you can modify the code as much as you want. When you update code, be |
| 350 | mindful of security-related mailing lists for the project and relevant CVE to |
| 351 | update your package. |
Dirk Pranke | bf4136b | 2018-09-20 22:48:43 | [diff] [blame] | 352 | |
| 353 | ## How we ensure that the right credits are displayed {#credits} |
| 354 | |
| 355 | As we said at the beginning, it is important that Chrome displays the |
| 356 | right credit and attributions for all of the third_party code we use. |
| 357 | |
| 358 | To view this in chrome, you can open chrome://credits. |
| 359 | |
| 360 | That page displays a resource embedded in the browser as part of the |
| 361 | [//components/resources/components_resources.grd](../components/resources/components_resource.grd) |
| 362 | GRIT file; the actual HTML text is generated in the |
| 363 | [//components/resources:about_credits](../components/resources/BUILD.gn) |
| 364 | build target using a template from the output of the |
Rachael Newitt | fc2e334 | 2023-07-04 23:07:31 | [diff] [blame] | 365 | [//tools/licenses/licenses.py](../tools/licenses/licenses.py) script. Assuming |
| 366 | you‘ve followed the rules above to ensure that you have the proper path to the |
| 367 | LICENSE file and set the Shipped value, if it passes the checks, it’ll be |
| 368 | included automatically. |