This new API allows consumers to call unblock() on the download if
they'd like to allow it. If they'd like to delete the blocked download's
partial data they may call confirmBlock(). Downloads also have a new
hasBlockedData property which will be true if the Download has blocked
data on disk.
DownloadIntegration now also allows for checking if handling downloads
in a blocked state is supported. As platforms support the new operations
on a blocked download they should update their implementation of this
check to keep the blocked download data on disk.
This also moves the reputation checking into the saver so it can happen
before moving the download to its final path - so we don't have possibly
dangerous files sitting around with their intended filename / extension.
If a Download did not use a part file and it fails the reputation check
we will always remove it to prevent dangerous files from existing with
their intended filename.
--HG--
extra : rebase_source : 519e3b4b98c8ccfc00039f35bd32e3143e39a5f8
We now serialize the Download.error property when saving to the store so
that data about error conditions will survive a restart. This is
important for supporting blocked downloads with partial data that could
be unblocked.
--HG--
extra : rebase_source : 8edaff4ddc2efb056bf06e689c7abe6cba72eabf
The -*- file variable lines -*- establish per-file settings that Emacs will
pick up. This patch makes the following changes to those lines (and touches
nothing else):
- Never set the buffer's mode.
Years ago, Emacs did not have a good JavaScript mode, so it made sense
to use Java or C++ mode in .js files. However, Emacs has had js-mode for
years now; it's perfectly serviceable, and is available and enabled by
default in all major Emacs packagings.
Selecting a mode in the -*- file variable line -*- is almost always the
wrong thing to do anyway. It overrides Emacs's default choice, which is
(now) reasonable; and even worse, it overrides settings the user might
have made in their '.emacs' file for that file extension. It's only
useful when there's something specific about that particular file that
makes a particular mode appropriate.
- Correctly propagate settings that establish the correct indentation
level for this file: c-basic-offset and js2-basic-offset should be
js-indent-level. Whatever value they're given should be preserved;
different parts of our tree use different indentation styles.
- We don't use tabs in Mozilla JS code. Always set indent-tabs-mode: nil.
Remove tab-width: settings, at least in files that don't contain tab
characters.
- Remove js2-mode settings that belong in the user's .emacs file, like
js2-skip-preprocessor-directives.