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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 as follows before writing out the binary proto. | 58 as follows before writing out the binary proto. |
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) Controls how files should be |
| 69 handled by the UI in the absence of a better signal from the Safe Browsing |
| 70 ping. This applies to all file types where `ping_setting` is either |
| 71 `SAMPLED_PING` or `NO_PING`, and downloads where the Safe Browsing ping |
| 72 either fails, is disabled, or returns an `UNKNOWN` verdict. Exceptions are |
| 73 noted below. |
| 74 |
| 75 The warning controlled here is a generic "This file may harm your computer." |
| 76 If the Safe Browsing verdict is `UNCOMMON`, `POTENTIALLY_UNWANTED`, |
| 77 `DANGEROUS_HOST`, or `DANGEROUS`, Chrome will show that more severe warning |
| 78 regardless of this setting. |
| 79 |
69 * `NOT_DANGEROUS`: Safe to download and open, even if the download | 80 * `NOT_DANGEROUS`: Safe to download and open, even if the download |
70 was accidental. | 81 was accidental. No additional warnings are necessary. |
71 * `DANGEROUS`: Always warn the user that this file may harm their | 82 * `DANGEROUS`: Always warn the user that this file may harm their |
72 computer. We let them continue or discard the file. If Safe | 83 computer. We let them continue or discard the file. If Safe |
73 Browsing returns a SAFE verdict, we still warn the user. | 84 Browsing returns a `SAFE` verdict, we still warn the user. |
74 * `ALLOW_ON_USER_GESTURE`: Warn the user normally but skip the warning | 85 * `ALLOW_ON_USER_GESTURE`: Potentially dangerous, but is likely harmless if |
75 if there was a user gesture or the user visited this site before | 86 the user is familiar with host and if the download was intentional. Chrome |
76 midnight last night (i.e. is a repeat visit). If Safe Browsing | 87 doesn't warn the user if both of the following conditions are true: |
77 returns a SAFE verdict for this file, it won't show a warning. | 88 |
| 89 * There is a user gesture associated with the network request that |
| 90 initiated the download. |
| 91 * There is a recorded visit to the referring origin that's older than |
| 92 the most recent midnight. This is taken to imply that the user has a |
| 93 history of visiting the site. |
| 94 |
| 95 In addition, Chrome skips the warning if the download was explicit (i.e. |
| 96 the user selected "Save link as ..." from the context menu), or if the |
| 97 navigation that resulted in the download was initiated using the Omnibox. |
78 | 98 |
79 * `platform_settings.auto_open_hint`: (required). | 99 * `platform_settings.auto_open_hint`: (required). |
80 * `ALLOW_AUTO_OPEN`: File type can be opened automatically if the user | 100 * `ALLOW_AUTO_OPEN`: File type can be opened automatically if the user |
81 selected that option from the download tray on a previous download | 101 selected that option from the download tray on a previous download |
82 of this type. | 102 of this type. |
83 * `DISALLOW_AUTO_OPEN`: Never let the file automatically open. | 103 * `DISALLOW_AUTO_OPEN`: Never let the file automatically open. |
84 Files that should be disallowed from auto-opening include those that | 104 Files that should be disallowed from auto-opening include those that |
85 execute arbitrary or harmful code with user privileges, or change | 105 execute arbitrary or harmful code with user privileges, or change |
86 configuration of the system to cause harmful behavior immediately | 106 configuration of the system to cause harmful behavior immediately |
87 or at some time in the future. We *do* allow auto-open for files | 107 or at some time in the future. We *do* allow auto-open for files |
(...skipping 19 matching lines...) Expand all Loading... |
107 users' downloads with unknown extensions (or | 127 users' downloads with unknown extensions (or |
108 ping_setting=SAMPLED_PING) should we send light-pings? [0.0 .. 1.0] | 128 ping_setting=SAMPLED_PING) should we send light-pings? [0.0 .. 1.0] |
109 | 129 |
110 * `file_types`: The big list of all known file types. Keep them | 130 * `file_types`: The big list of all known file types. Keep them |
111 sorted by extension. | 131 sorted by extension. |
112 | 132 |
113 * `default_file_type`: Settings used if a downloaded file is not in | 133 * `default_file_type`: Settings used if a downloaded file is not in |
114 the above list. `extension` is ignored, but other settings are used. | 134 the above list. `extension` is ignored, but other settings are used. |
115 The ping_setting should be SAMPLED_PING for all platforms. | 135 The ping_setting should be SAMPLED_PING for all platforms. |
116 | 136 |
OLD | NEW |