OLD | NEW |
1 # Behavior of Download File Types in Chrome | 1 # Behavior of Download File Types in Chrome |
2 | 2 |
3 This describes how to adjust file-type download behavior in | 3 This describes how to adjust file-type download behavior in |
4 Chrome including interactions with Safe Browsing. The metadata described | 4 Chrome including interactions with Safe Browsing. The metadata described |
5 here, and stored in `download_file_types.asciipb`, will be both baked into | 5 here, and stored in `download_file_types.asciipb`, will be both baked into |
6 Chrome released and pushable to Chrome between releases (via | 6 Chrome released and pushable to Chrome between releases (via |
7 `FileTypePolicies` class). http://crbug.com/596555 | 7 `FileTypePolicies` class). http://crbug.com/596555 |
8 | 8 |
9 Rendered version of this file: https://chromium.googlesource.com/chromium/src/+/
master/chrome/browser/resources/safe_browsing/README.md | 9 Rendered version of this file: https://chromium.googlesource.com/chromium/src/+/
master/chrome/browser/resources/safe_browsing/README.md |
10 | 10 |
11 | 11 |
12 ## Procedure for adding/modifying file type(s) | 12 ## Procedure for adding/modifying file type(s) |
13 * **Edit** `download_file_types.asciipb` and update `histograms.xml` | 13 * **Edit** `download_file_types.asciipb` and update `enums.xml` |
14 * Get it reviewed, **submit.** | 14 * Get it reviewed, **submit.** |
15 * **Push** it to all users via component update: | 15 * **Push** it to all users via component update: |
16 * Wait 1-3 day for this to run on Canary to verify it doesn't crash Chrome. | 16 * Wait 1-3 day for this to run on Canary to verify it doesn't crash Chrome. |
17 * In a synced checkout, run the following to generate protos for all | 17 * In a synced checkout, run the following to generate protos for all |
18 platforms and push them to GCS. Replace the arg with your build directory: | 18 platforms and push them to GCS. Replace the arg with your build directory: |
19 * % `chrome/browser/resources/safe_browsing/push_file_type_proto.py -d | 19 * % `chrome/browser/resources/safe_browsing/push_file_type_proto.py -d |
20 out-gn/Debug` | 20 out-gn/Debug` |
21 * It will ask you to double check its actions before proceeding. It will | 21 * It will ask you to double check its actions before proceeding. It will |
22 fail if you're not a member of | 22 fail if you're not a member of |
23 `chrome-file-type-policies-pushers@google.com`, since that's required for | 23 `chrome-file-type-policies-pushers@google.com`, since that's required for |
24 access to the GCS bucket. | 24 access to the GCS bucket. |
25 * The Component Updater system will notice those files and push them to | 25 * The Component Updater system will notice those files and push them to |
26 users withing ~6 hours. If not, contact `waffles@.` | 26 users withing ~6 hours. If not, contact `waffles@.` |
27 | 27 |
28 | 28 |
29 ## Guidelines for a DownloadFileType entry: | 29 ## Guidelines for a DownloadFileType entry: |
30 See `download_file_types.proto` for all fields. | 30 See `download_file_types.proto` for all fields. |
31 | 31 |
32 * `extension`: (required) Value must be unique within the config. It should be | 32 * `extension`: (required) Value must be unique within the config. It should be |
33 lowercase ASCII and not contain a dot. If there _is_ a duplicate, | 33 lowercase ASCII and not contain a dot. If there _is_ a duplicate, |
34 first one wins. Only the `default_file_type` should leave this unset. | 34 first one wins. Only the `default_file_type` should leave this unset. |
35 | 35 |
36 * `uma_value`: (required) must be unique and match one in the | 36 * `uma_value`: (required) must be unique and match one in the |
37 `SBClientDownloadExtensions` enum in `histograms.xml`. | 37 `SBClientDownloadExtensions` enum in `enums.xml`. |
38 | 38 |
39 * `is_archive`: `True` if this filetype is a container for other files. | 39 * `is_archive`: `True` if this filetype is a container for other files. |
40 Leave it unset for `false`. | 40 Leave it unset for `false`. |
41 | 41 |
42 * `ping_setting`: (required). This controls what sort of ping is sent | 42 * `ping_setting`: (required). This controls what sort of ping is sent |
43 to Safe Browsing and if a verdict is checked before the user can | 43 to Safe Browsing and if a verdict is checked before the user can |
44 access the file. | 44 access the file. |
45 | 45 |
46 * `SAMPLED_PING`: Don't send a full Safe Browsing ping, but | 46 * `SAMPLED_PING`: Don't send a full Safe Browsing ping, but |
47 send a no-PII "light-ping" for a random sample of SBER users. | 47 send a no-PII "light-ping" for a random sample of SBER users. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 users' downloads with unknown extensions (or | 133 users' downloads with unknown extensions (or |
134 ping_setting=SAMPLED_PING) should we send light-pings? [0.0 .. 1.0] | 134 ping_setting=SAMPLED_PING) should we send light-pings? [0.0 .. 1.0] |
135 | 135 |
136 * `file_types`: The big list of all known file types. Keep them | 136 * `file_types`: The big list of all known file types. Keep them |
137 sorted by extension. | 137 sorted by extension. |
138 | 138 |
139 * `default_file_type`: Settings used if a downloaded file is not in | 139 * `default_file_type`: Settings used if a downloaded file is not in |
140 the above list. `extension` is ignored, but other settings are used. | 140 the above list. `extension` is ignored, but other settings are used. |
141 The ping_setting should be SAMPLED_PING for all platforms. | 141 The ping_setting should be SAMPLED_PING for all platforms. |
142 | 142 |
OLD | NEW |