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 `histograms.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, generate protos for all platforms: | 17 * In a synced checkout, run the following to generate protos for all |
18 * % `ninja -C out-gn/Debug | 18 platforms and push them to GCS. Replace the arg with your build directory: |
19 chrome/browser/resources/safe_browsing:make_all_file_types_protobuf` | 19 * % `chrome/browser/resources/safe_browsing/push_file_type_proto.py -d |
20 * That will instruct you to run another command to push the files to GCS. | 20 out-gn/Debug` |
21 You must a member of chrome-file-type-policies-pushers@google.com to have | 21 * It will ask you to double check its actions before proceeding. It will |
| 22 fail if you're not a member of |
| 23 `chrome-file-type-policies-pushers@google.com`, since that's required for |
22 access to the GCS bucket. | 24 access to the GCS bucket. |
23 * 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 |
24 users withing ~6 hours. If not, contact `waffles@.` | 26 users withing ~6 hours. If not, contact `waffles@.` |
25 | 27 |
26 | 28 |
27 ## Guidelines for a DownloadFileType entry: | 29 ## Guidelines for a DownloadFileType entry: |
28 See `download_file_types.proto` for all fields. | 30 See `download_file_types.proto` for all fields. |
29 | 31 |
30 * `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 |
31 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, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 105 |
104 * `sampled_ping_probability`: For what fraction of extended-reporting | 106 * `sampled_ping_probability`: For what fraction of extended-reporting |
105 users' downloads with unknown extensions (or | 107 users' downloads with unknown extensions (or |
106 ping_setting=SAMPLED_PING) should we send light-pings? [0.0 .. 1.0] | 108 ping_setting=SAMPLED_PING) should we send light-pings? [0.0 .. 1.0] |
107 | 109 |
108 * `file_types`: The big list of all known file types. Keep them | 110 * `file_types`: The big list of all known file types. Keep them |
109 sorted by extension. | 111 sorted by extension. |
110 | 112 |
111 * `default_file_type`: Settings used if a downloaded file is not in | 113 * `default_file_type`: Settings used if a downloaded file is not in |
112 the above list. `extension` is ignored, but other settings are used. | 114 the above list. `extension` is ignored, but other settings are used. |
113 The ping_setting should be SAMPLED_PING for all platforms. Only the | 115 The ping_setting should be SAMPLED_PING for all platforms. |
114 first platform_setting is used. | |
115 | 116 |
OLD | NEW |