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 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 1. If there's an entry matching the built platform, | 60 1. If there's an entry matching the built platform, |
61 that will be preferred. Otherwise, | 61 that will be preferred. Otherwise, |
62 | 62 |
63 2. If there's a "PLATFORM_ANY" (i.e. `platform` is not set), | 63 2. If there's a "PLATFORM_ANY" (i.e. `platform` is not set), |
64 that will be used. Otherwise, | 64 that will be used. Otherwise, |
65 | 65 |
66 3. The `default_file_type`'s settings will be filled in. | 66 3. The `default_file_type`'s settings will be filled in. |
67 | 67 |
68 * `platform_settings.danger_level`: (required) | 68 * `platform_settings.danger_level`: (required) |
| 69 Note that this policy affects how individual file downloads are handled as |
| 70 well as how subresources are handled for *"Save As ..."* downloads of |
| 71 complete web pages. |
| 72 |
| 73 For *"Save As ..."* downloads, if any subresource ends up with a file type |
| 74 that is considered `DANGEROUS` or `ALLOW_ON_USER_GESTURE`, then the filename |
| 75 will be changed to end in `.download`. This is done to prevent the file from |
| 76 being opened accidentally. |
| 77 |
69 * `NOT_DANGEROUS`: Safe to download and open, even if the download | 78 * `NOT_DANGEROUS`: Safe to download and open, even if the download |
70 was accidental. | 79 was accidental. |
71 * `DANGEROUS`: Always warn the user that this file may harm their | 80 * `DANGEROUS`: Always warn the user that this file may harm their |
72 computer. We let them continue or discard the file. If Safe | 81 computer. We let them continue or discard the file. If Safe |
73 Browsing returns a SAFE verdict, we still warn the user. | 82 Browsing returns a SAFE verdict, we still warn the user. |
74 * `ALLOW_ON_USER_GESTURE`: Warn the user normally but skip the warning | 83 * `ALLOW_ON_USER_GESTURE`: Warn the user normally but skip the warning |
75 if there was a user gesture or the user visited this site before | 84 if there was a user gesture or the user visited this site before |
76 midnight last night (i.e. is a repeat visit). If Safe Browsing | 85 midnight last night (i.e. is a repeat visit). If Safe Browsing |
77 returns a SAFE verdict for this file, it won't show a warning. | 86 returns a SAFE verdict for this file, it won't show a warning. |
78 | 87 |
(...skipping 28 matching lines...) Expand all Loading... |
107 users' downloads with unknown extensions (or | 116 users' downloads with unknown extensions (or |
108 ping_setting=SAMPLED_PING) should we send light-pings? [0.0 .. 1.0] | 117 ping_setting=SAMPLED_PING) should we send light-pings? [0.0 .. 1.0] |
109 | 118 |
110 * `file_types`: The big list of all known file types. Keep them | 119 * `file_types`: The big list of all known file types. Keep them |
111 sorted by extension. | 120 sorted by extension. |
112 | 121 |
113 * `default_file_type`: Settings used if a downloaded file is not in | 122 * `default_file_type`: Settings used if a downloaded file is not in |
114 the above list. `extension` is ignored, but other settings are used. | 123 the above list. `extension` is ignored, but other settings are used. |
115 The ping_setting should be SAMPLED_PING for all platforms. | 124 The ping_setting should be SAMPLED_PING for all platforms. |
116 | 125 |
OLD | NEW |