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. http://crbug.com/596555 | 6 Chrome released and pushable to Chrome between releases. http://crbug.com/596555 |
7 | 7 |
8 Rendered version of this file: https://chromium.googlesource.com/chromium/src/+/
master/chrome/browser/resources/safe_browsing/README.md | 8 Rendered version of this file: https://chromium.googlesource.com/chromium/src/+/
master/chrome/browser/resources/safe_browsing/README.md |
9 | 9 |
10 | 10 |
11 ## Procedure for adding a new type | 11 ## Procedure for adding a new type |
12 * Edit `download_file_types.asciipb` and update `histograms.xml` | 12 * Edit `download_file_types.asciipb`, edit `download_stats.cc` (necessary |
| 13 until it gets replaced), and update `histograms.xml` |
13 * Get it reviewed, submit. | 14 * Get it reviewed, submit. |
14 * Push via component update (PROCEDURE TBD) | 15 * Push via component update (PROCEDURE TBD) |
15 | 16 |
16 ## Guidelines for a DownloadFileType entry: | 17 ## Guidelines for a DownloadFileType entry: |
17 See `download_file_types.proto` for all fields. | 18 See `download_file_types.proto` for all fields. |
18 | 19 |
19 * `extension`: (required) Value must be unique within the config. It should be | 20 * `extension`: (required) Value must be unique within the config. It should be |
20 lowercase ASCII and not contain a dot. If there _is_ a duplicate, | 21 lowercase ASCII and not contain a dot. If there _is_ a duplicate, |
21 first one wins. Only the `default_file_type` should leave this unset. | 22 first one wins. Only the `default_file_type` should leave this unset. |
22 | 23 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 ping_setting=SAMPLED_PING) should we send light-pings? [0.0 .. 1.0] | 96 ping_setting=SAMPLED_PING) should we send light-pings? [0.0 .. 1.0] |
96 | 97 |
97 * `file_types`: The big list of all known file types. Keep them | 98 * `file_types`: The big list of all known file types. Keep them |
98 sorted by extension. | 99 sorted by extension. |
99 | 100 |
100 * `default_file_type`: Settings used if a downloaded file is not in | 101 * `default_file_type`: Settings used if a downloaded file is not in |
101 the above list. `extension` is ignored, but other settings are used. | 102 the above list. `extension` is ignored, but other settings are used. |
102 The ping_setting should be SAMPLED_PING for all platforms. Only the | 103 The ping_setting should be SAMPLED_PING for all platforms. Only the |
103 first platform_setting is used. | 104 first platform_setting is used. |
104 | 105 |
OLD | NEW |