| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
checks.
When safe browsing is enabled, downloads that will be subject to
content based checked will be marked as non-safe even when we are
prompting the user for the download location. During filename
determination |DownloadItem::suggested_path_| will be set to an
intermediate filename for these downloads. For safe downloads,
|suggested_path_| is the final download path.
This patch:
- Changes target filename determination when prompting for the
download location in DownloadManagerImpl::RestartDownload() to use
the |target_name| instead of |suggested_path_| for non-safe
downloads.
- Allows the target filename to be altered in
DownloadItemImpl::OnPathDetermined after prompting.
- Uses the previously determined intermediate filename for non-safe
downloads if prompted in
ChromeDownloadManagerDelegate::OverrideIntermediatePath.
- Only uniquifies the target filename if it is a non-safe download for
which no file selection prompts have been shown, in
DownloadItemImpl::OnDownloadCompleting.
BUG=106194
TEST=unit_tests --gtest_filter=DownloadManagerTest.*
Review URL: http://codereview.chromium.org/8919019
TBR=asanka@chromium.org
Review URL: http://codereview.chromium.org/8961022
git-svn-id: svn://svn.chromium.org/chrome/branches/963/src@114927 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
received doesn't match Content-Length.
This used to be reported as ERR_CONNECTION_CLOSED. Unfortunately, there are a number of misconfigured servers on the web which report a Content-Length completely divorced from reality. Other browsers display whatever data was received without reporting errors in this case, and Chrome now does the same.
An earlier CL simply removed error reporting for this case. However, some uses may want to still treat this like an error (such as URLFetcher), or could eventually treat the case as an error and recover (such as downloads).
Data received will be populated in the disk cache as a truncated entry, if the server advertises byte range support.
WebURLLoaderImpl ignores this for all async and sync resource loads. At some point it may want to selectively do this based on content type.
Downloads ignore the error, but no longer ignore ERR_CONNECTION_CLOSED.
Other uses will treat this like an error.
BUG=52847
TEST=Manually, go to a site that advertises a large content-length and closes the connection before writing so many bytes, and notice that the page now displays.
Automatic: HttpNetworkTransactionTest.LargeContentLengthThenClose, URLRequestTestHttp.GetZippedTest
Review URL: http://codereview.chromium.org/8496016
TBR=cbentzel@chromium.org
Review URL: http://codereview.chromium.org/8862009
git-svn-id: svn://svn.chromium.org/chrome/branches/963/src@113515 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=
TEST=No visible change.
Review URL: http://codereview.chromium.org/8790006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113129 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DownloadItem unit tests.
BUG=101214
Review URL: http://codereview.chromium.org/8697006
TBR=rdsmith@chromium.org
Review URL: http://codereview.chromium.org/8817005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113084 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=101214
Review URL: http://codereview.chromium.org/8697006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113007 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new enum Download.ContentImageType rather than adding additional entries to Download.ContentType.
The downside is that there is a bit more code. The upside is that we don't have to worry about the image entries getting fragmented across the Download.ContentType enum, and there is a top-level entry for images in the Download.ContentType histogram to compare against other general media types.
TEST=Download a few images, make sure Download.ContentType and Download.ContentImageType look sane.
Review URL: http://codereview.chromium.org/8734006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112711 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
range requests.
Change the names of the statistics, so that there is no pollution of the data.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/8746020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112302 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change doesn't change the way the calculation is performed but moves
it to the file thread, in preperation for implementing a different speed
calculation method.
BUG=None
TEST=Manually tested; automated tests needed.
Review URL: http://codereview.chromium.org/8595004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112152 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want to see what proprotion don't accept range requests, to evaluate
the impact of closing the connection on download pause.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/8659006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111821 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
Chrome. While at it, I also made the ResourceResponse wrapper just derive from ResourceResponseHead, so that the parameters are accessed directly, instead of having to go through a member variable.
BUG=98716
Review URL: http://codereview.chromium.org/8680036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111471 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Relanding:
MHTMLGenerationManager now uses a callback instead of a notification.
BUG=None
TEST=MHTML generation (via extension API should still work).
TBR=jam
Review URL: http://codereview.chromium.org/8674002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111328 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MHTMLGenerationManager now uses a callback instead of a notification.
BUG=None
TEST=MHTML generation (via extension API should still work).
Review URL: http://codereview.chromium.org/8566016
TBR=jcivelli@chromium.org
Review URL: http://codereview.chromium.org/8672001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111256 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
MHTMLGenerationManager now uses a callback instead of a notification.
BUG=None
TEST=MHTML generation (via extension API should still work).
Review URL: http://codereview.chromium.org/8566016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111252 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
DownloadItems.
Review URL: http://codereview.chromium.org/8503018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110984 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
| |
download has started.
Review URL: http://codereview.chromium.org/8587042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110750 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/8475024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110719 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
interface is implemented by the RenderProcessHostImpl class which lives in content\browser\renderer_host\render_process_host_impl.cc/.h. The RenderProcessHostImpl class is a consolidation of the RenderProcessHost and BrowserRenderProcessHost classes.
The RenderProcessHost public interface was created from the now deleted RenderProcessHost class defined in content\browser\renderer_host\render_process_host.h.
Additional methods have been added to the interface to ensure that it works correctly with the MockRenderProcessHost class used by unit tests. I had to implement a number of overrides in the MockRenderProcessHost class to ensure that tests work correctly. This was because of assumptions in the tests that the MockRPH class was a real RPH which it was till now.
Added a TODO for the methods which could potentially be removed from this interface. Will revisit that in a subsequent CL.
BUG=98716
TEST=No change in functionality. Hopefully it all compiles and works.
Review URL: http://codereview.chromium.org/8515027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110615 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is where the UI will be notified when a malicious binary is being
downloaded. The UI currently does not support displaying a warning after
the download started. We'll fix that in a separate CL.
BUG=102540
TEST=No visible changes.
Review URL: http://codereview.chromium.org/8468020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110583 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=104314
TEST=no change
Review URL: http://codereview.chromium.org/8587009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110544 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
These were checked in executable, which is probably not what Andy wanted. He blames visual studio, self.
No review URL, since its just a props change and our git cl fu is weak.
TBR=ahendrickson
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110511 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
match Content-Length.
This used to be reported as ERR_CONNECTION_CLOSED. Unfortunately, there are a number of misconfigured servers on the web which report a Content-Length completely divorced from reality. Other browsers display whatever data was received without reporting errors in this case, and Chrome now does the same.
An earlier CL simply removed error reporting for this case. However, some uses may want to still treat this like an error (such as URLFetcher), or could eventually treat the case as an error and recover (such as downloads).
Data received will be populated in the disk cache as a truncated entry, if the server advertises byte range support.
WebURLLoaderImpl ignores this for all async and sync resource loads. At some point it may want to selectively do this based on content type.
Downloads ignore the error, but no longer ignore ERR_CONNECTION_CLOSED.
Other uses will treat this like an error.
BUG=52847
TEST=Manually, go to a site that advertises a large content-length and closes the connection before writing so many bytes, and notice that the page now displays.
Automatic: HttpNetworkTransactionTest.LargeContentLengthThenClose, URLRequestTestHttp.GetZippedTest
Review URL: http://codereview.chromium.org/8496016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110505 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
Bug=None
Test=None
Review URL: http://codereview.chromium.org/8351052
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110499 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110380 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
Bug=None
Test=None
Review URL: http://codereview.chromium.org/8372034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110377 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will mean that when things like cancel are done on downloads resulting
from a Save Page As ..., chrome will not crash. They also won't do anything,
but that's the previous (broken :-{) behavior.
BUG=103590
R=cbentzel@chromium.org
Review URL: http://codereview.chromium.org/8519008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110216 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=compiles and tests pass.
Review URL: http://codereview.chromium.org/8556001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110164 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=22900
BUG=100529
Review URL: http://codereview.chromium.org/8494015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109479 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
for the improved SafeBrowsing download protection later.
BUG=102540
TEST=No visible change. Run DownloadItemTest, DownloadManagerTest
Review URL: http://codereview.chromium.org/8511020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109471 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://crbug.com/102933.
BUG=102933
R=benjhayden@chromium.org
Review URL: http://codereview.chromium.org/8485003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109448 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8499042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109363 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This timer is redundant - all state changes which need to be updated immediately
call UpdateObservers directly, and there is already a central timer in the
download file manager which updates progress.
Testing has been done manually to ensure the download shelf and the downloads UI
get updated properly when downloading items. Also unit testing has been added
for DownloadItem's public interface to check that state-changing functions
generate notifications.
BUG=None
TEST=See above.
Review URL: http://codereview.chromium.org/8463003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108947 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Request_handles are null in DownloadItems generated from the history;
any methods that may be called on such download items need to work with
null request handles.
BUG=102933
Review URL: http://codereview.chromium.org/8465001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108653 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=None
TEST=Unit tests added.
Review URL: http://codereview.chromium.org/8425004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108424 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem is that chmod() fails on NTFS and FAT file systems.
That should not cause the download to fail.
The bug was introduced in r99579 (Chrome 15). I tested it with the previous revision and that one, to verify that as the point where the bug first showed up.
BUG=50104,102200
TEST=Download a file on Ubuntu, to an NTFS disk.
Review URL: http://codereview.chromium.org/8438048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108380 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=98687
TEST=*WebstorePrivate*
Review URL: http://codereview.chromium.org/8430033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108367 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=None
Review URL: http://codereview.chromium.org/8135032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108309 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
TBR=owners
BUG=98716
Review URL: http://codereview.chromium.org/8437002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108270 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=101214
Review URL: http://codereview.chromium.org/8399001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108149 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This involves killing the code in ShouldOpenDownload (vestigal), renaming
ShouldCompleteDownload to ShouldOpenDownload, and creating a new
ShouldCompleteDownload delegate method to allow blocking download completion
before final rename.
Review URL: http://codereview.chromium.org/8414007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108141 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=98716
Review URL: http://codereview.chromium.org/8400060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107964 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GetNextIdThunkType with DownloadIdFactory (RefCountedThreadSafe, created by DownloadService).
DownloadService uses the same DownloadIdFactory for an OTR profile as its original profile.
DownloadService passes the DownloadIdFactory into the DownloadManager so that the DownloadManager can allocate new valid ids for items loaded from the history or downloads started on the ui thread.
Since the DownloadService precedes and outlives its DownloadManager, DownloadManager does not have a scoped_refptr<DownloadIdFactory>. Objects that do have a scoped_refptr<DownloadIdFactory>: DownloadService, ProfileIOData, ShellBrowserContext, ShellResourceContext.
The DownloadIdFactory must be RefCountedThreadSafe because ProfileIOData outlives Profile and because it's used in both the OTR and original profiles.
Longer term, the import process should strictly precede profile initialization, and the next_download_id counter should be loaded from the History db strictly before DownloadService is created and creates a DownloadIdFactory.
BUG=98966
Review URL: http://codereview.chromium.org/8401001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107836 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=chromium-os:22024
TEST=compiles, tests pass.
Review URL: http://codereview.chromium.org/8417009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107802 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=chromium-os:22024
TEST=compiles, tests pass.
Review URL: http://codereview.chromium.org/8343042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107788 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=chromium-os:22024
TEST=compiles, tests pass.
Review URL: http://codereview.chromium.org/8416018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107787 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=chromium-os:22024
TEST=compiles, tests pass.
Review URL: http://codereview.chromium.org/8413016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107786 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=chromium-os:22024
TEST=compiles, tests pass.
Review URL: http://codereview.chromium.org/8417010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107785 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
unit_tests.
R=jam@chromium.org
BUG=90442
TEST=
Review URL: http://codereview.chromium.org/8343046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107762 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only content/ now has the ability to create BrowserThread objects,
with the exception that tests can create the
content::TestBrowserThread subclass, and (temporarily) code in chrome/
can create the DeprecatedBrowserThread subclass.
A follow-up change will make content/ take care of its own thread
creation, remove DeprecatedBrowserThread, and move all state and
non-trivial constructors from BrowserThread down to BrowserThreadImpl.
Also moved BrowserProcessSubThread into content/ namespace. As part
of follow-up cleanup, chrome/ will stop using this class.
BUG=98716
TEST=existing
Review URL: http://codereview.chromium.org/8392042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107718 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
R=jam@chromium.org
BUG=90442
TEST=none
Review URL: http://codereview.chromium.org/8381024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107510 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=chromium-os:22024
TEST=tests pass.
Review URL: http://codereview.chromium.org/8393042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107439 0039d316-1c4b-4281-b951-d872f2087c98
|