| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
notification interface).
* Changed DownloadItem::COMPLETE state to mean "really all done" with download (used to mean "all data received"). This isn't a very large change, since we recently put in another change to dangerous downloads where we didn't recognize all data received until we had been accepted by the user, which means that there aren't any blocking points between all data received and COMPLETE.
* Removed DownloadItem::Observer::OnDownloadFileCompleted() notification. It's now redundant with the COMPLETE state, and the COMPLETE state works better for synchronization (because you can test the download item for it as opposed to having to be an observer when the notification is sent).
* Added a basic test for cancel functionality in the downloads system.
Also shifted MarkAsComplete to be used only by SavePackage, and make sure that the final transition occurs for drag-n-drop downloads (which don't need to go through name finalization).
BUG=78183
TEST=All known download tests, manual drag-and-drop and dangerous accept/discard pre/post data received.
Review URL: http://codereview.chromium.org/6720061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82113 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In an ideal world, we would do the unifiquation on both the safe and dangerous download paths at the same place.
Until that refactor occurs, however, we'll have to pass in a flag to distinguish them in DownloadFileManager::RenameFinishedDownloadFile().
BUG=78551
TEST=Overwrite a safe file while downloading. It should be overwritten rather than uniquified with a number. Passes DownloadManagerTest.DownloadOverwriteTest.
Review URL: http://codereview.chromium.org/6824056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81413 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=None
TEST=Download manager unit tests no longer leak in Valgrind.
Review URL: http://codereview.chromium.org/6815015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80845 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a download error occurs, we now mark it as "Interrupted", and display the new status on the Download Shelf.
This is handled through the OnResponseCompleted() method, from:
DownloadResourceHandler ->
DownloadFileManager ->
DownloadManager
The latter checks the error value, and if not zero calls DownloadError().
DownloadError() marks the download as interrupted (stopping the progress timer), updates the download history, and updates its Observers.
DownloadItem::DownloadState now has a new state, INTERRUPTED.
There are also new display strings that show up on interrupted downloads in the download shelf and download page.
BUG=35278
TEST=Pass unit and browser tests. Also, run a python server that behaves as described below, connect to it, and observe that "Interrupted" shows up in the item on the download shelf. Check that the item behaves as if it were cancelled.
The Python server should respond to a GET request with a content length that is large, then provide several chunks of data (but less than the specified length) and then send a 'No file' response (code 204) and close the connection.
Review URL: http://codereview.chromium.org/6613024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80803 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
raw_scoped_refptr_mismatch_checker.h
ref_counted.cc
ref_counted.h
ref_counted_memory.cc
ref_counted_memory.h
ref_counted_unittest.cc
scoped_callback_factory.h
scoped_comptr_win.h
scoped_handle.h
scoped_native_library.cc
scoped_native_library.h
scoped_native_library_unittest.cc
scoped_nsobject.h
scoped_open_process.h
scoped_ptr.h
scoped_ptr_unittest.cc
scoped_temp_dir.cc
scoped_temp_dir.h
scoped_temp_dir_unittest.cc
scoped_vector.h
singleton.h
singleton_objc.h
singleton_unittest.cc
linked_ptr.h
linked_ptr_unittest.cc
weak_ptr.cc
weak_ptr.h
weak_ptr_unittest.cc
BUG=None
TEST=Compile
Review URL: http://codereview.chromium.org/6714032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
TBR: rdsmith
BUG=None
TEST=DownloadManagerTest.StartDownload no longer runs on ChromeOS buildbots.
Review URL: http://codereview.chromium.org/6676129
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79335 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Manual testing matrix:
+--------------------------------------+------+-------+-------------+-------------+
| |Accept/Decline| Cancelled | |
| Test |Before| After |Before|After | Completed |
| |Full download |Full download| |
+--------------------------------------+------+-------+-------------+-------------+
|Drag & Drop | N/A | N/A | Y |
+--------------------------------------+------+-------+-------------+-------------+
|Safe | N/A | | | Y |
+--------------------------------------+------+-------+-------------+-------------+
|Safe | N/A | Y | N/A | |
+--------------------------------------+------+-------+-------------+-------------+
|Safe with uniquification | N/A | | N/A | Y |
+--------------------------------------+------+-------+-------------+-------------+
|Safe with uniquification | N/A | Y | N/A | |
+--------------------------------------+------+-------+-------------+-------------+
|Dangerous Accepted | Y | | N/A | Y |
+--------------------------------------+------+-------+-------------+-------------+
|Dangerous Accepted | | Y | N/A | Y |
+--------------------------------------+------+-------+-------------+-------------+
|Dangerous Accepted with uniquification| Y | | N/A | Y |
+--------------------------------------+------+-------+-------------+-------------+
|Dangerous Accepted with uniquification| | Y | N/A | Y |
+--------------------------------------+------+-------+-------------+-------------+
|Dangerous Declined | Y | | N/A | N/A |
+--------------------------------------+------+-------+-------------+-------------+
|Dangerous Declined | | Y | N/A | N/A |
+--------------------------------------+------+-------+-------------+-------------+
I couldn't figure out how to get Drag & Drop to work in Windows. All I got was a URL shortcut when I tried.
BUG=49394, 49568, 75277
TEST=Passes all download tests. Passes all tests in the above matrix.
Review URL: http://codereview.chromium.org/6588020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79313 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
malware hit when needed.
TEST=safe_browsing tests stay green.
BUG=60822
Review URL: http://codereview.chromium.org/6611005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77382 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This doesn't solve the problem with view-source://, that is a
separate issue.
BUG=35795
TEST=manual, see bug.
Review URL: http://codereview.chromium.org/6574033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77020 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
TBR=avi
Review URL: http://codereview.chromium.org/6594084
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76411 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
The whole thing is still behind a flag.
The download_file_manager will start a url check with safebrowsing. It goes parallel with file creation operation. When url is checked to be dangerous, the UI dialog will show the dialog.
TEST=download_manager_unittest
BUG=60822
Review URL: http://codereview.chromium.org/6410050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76123 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
occurred.
Instead, DownloadFileManager puts the DownloadFile in a new map when it has the final name.
This is a step towards moving the 'final rename' determination happen in the UI thread.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/6480079
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75400 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Removed dead code (DeleteCrDownload method), and unnecessary parameter.
BUG=None
TEST=DownloadFile unit tests still pass.
Review URL: http://codereview.chromium.org/6485008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74949 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=None
TEST=Unit tests pass.
Review URL: http://codereview.chromium.org/6312037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73507 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change shifts standard download processing to wait on history
insertion (note that actual data download does not wait). This makes the
download process less racy and is expected to make the download tests less
flaky.
Note that it also brings the rename to the download intermediate file rename
inline into standard download processing; i.e. now we always rename to the
intermediate file name and then to the final file name. This again reduces
raciness and possibly tset flakiness.
BUG=63237
TEST=All current download tests.
Review URL: http://codereview.chromium.org/6096003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72301 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=3563
TEST=manual
Review URL: http://codereview.chromium.org/6247015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72204 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
advanced user knows what they were doing, and dangerous file types will still
go through the warning dialog depending on user gesture level.
BUG=65895
TEST=download_manager_unittest.cc
Review URL: http://codereview.chromium.org/6196001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70853 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Since DownloadItem is now created before we analyze the file to determine its characteristics and final name/location, I have added a function SetFileCheckResults() to update DownloadItem after this process has been done.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/5738007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70096 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
a default list for all platforms. Also added a few previously overlooked extensions for various platforms.
BUG=59817
TEST=None
Review URL: http://codereview.chromium.org/3899002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63158 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Include browser_thread.h instead of chrome_thread.h in files
under dom_ui and download.
BUG=56926
TEST=trybots
Review URL: http://codereview.chromium.org/3700002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62206 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
- Rename entries under download and extensions.
BUG=56926
TEST=trybots
Review URL: http://codereview.chromium.org/3685001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62081 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
They indicate real problems, including possible NULL
pointer dereferences.
BUG=57577
TEST=none
Review URL: http://codereview.chromium.org/3519005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61634 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and update the application icon.
We can't do that in DownloadManager because there are multiple
DownloadManagers (one per Profile) and they would overwrite
each other's updates.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3454018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60625 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cleanup patch isn't as impactful; this only shrinks our .a files by 304k.
This patch also renames chrome/browser/history/download_type.h to download_create_info.h because there are then two download_type.cc files and MSVS will have the .obj from one of those overwrite the other.
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/3351005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59264 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Also, moved some code closer to the object it's operating on.
BUG=48913
TEST=unit_tests, ui_tests, browser_tests
Review URL: http://codereview.chromium.org/3341013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59156 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes a lot of duplication, locking, and thread jumping.
Most of the operations run on the FILE thread, and we do not duplicate
so much information. Each DownloadFile keeps track of its DownloadManager
(each Profile has its own DownloadManager). This allows us to remove
many maps from DownloadFileManager that were duplicating that information.
There is still SaveFileManager, but hopefully I will be able
to merge those two in small steps.
Hopefully, this is http://codereview.chromium.org/3245005 done right.
TEST=unit_tests, browser_tests, ui_tests
BUG=48913
Review URL: http://codereview.chromium.org/3347018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59139 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes a lot of duplication, locking, and thread jumping.
Most of the operations run on the FILE thread, and we do not duplicate
so much information. Each DownloadFile keeps track of its DownloadManager
(each Profile has its own DownloadManager). This allows us to remove
many maps from DownloadFileManager that were duplicating that information.
There is still SaveFileManager, but hopefully I will be able
to merge those two in small steps.
TEST=unit_tests, browser_tests, ui_tests
BUG=48913
Review URL: http://codereview.chromium.org/3245005
TBR=phajdan.jr@chromium.org
Review URL: http://codereview.chromium.org/3348010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58718 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes a lot of duplication, locking, and thread jumping.
Most of the operations run on the FILE thread, and we do not duplicate
so much information. Each DownloadFile keeps track of its DownloadManager
(each Profile has its own DownloadManager). This allows us to remove
many maps from DownloadFileManager that were duplicating that information.
There is still SaveFileManager, but hopefully I will be able
to merge those two in small steps.
TEST=unit_tests, browser_tests, ui_tests
BUG=48913
Review URL: http://codereview.chromium.org/3245005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58196 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
at this
point.
Revert 58087 - GTTF: Clean up DownloadFileManager
This removes a lot of duplication, locking, and thread jumping.
Most of the operations run on the FILE thread, and we do not duplicate
so much information. Each DownloadFile keeps track of its DownloadManager
(each Profile has its own DownloadManager). This allows us to remove
many maps from DownloadFileManager that were duplicating that information.
There is still SaveFileManager, but hopefully I will be able
to merge those two in small steps.
TEST=unit_tests, browser_tests, ui_tests
BUG=48913
Review URL: http://codereview.chromium.org/3245005
TBR=phajdan.jr@chromium.org
Review URL: http://codereview.chromium.org/3311001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58119 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes a lot of duplication, locking, and thread jumping.
Most of the operations run on the FILE thread, and we do not duplicate
so much information. Each DownloadFile keeps track of its DownloadManager
(each Profile has its own DownloadManager). This allows us to remove
many maps from DownloadFileManager that were duplicating that information.
There is still SaveFileManager, but hopefully I will be able
to merge those two in small steps.
TEST=unit_tests, browser_tests, ui_tests
BUG=48913
Review URL: http://codereview.chromium.org/3245005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58087 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
DownloadPrefs.
TEST=unit_tests, browser_tests, ui_tests
BUG=48913
Review URL: http://codereview.chromium.org/3226010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57916 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename includes, resort header include order in places where the rename
changed the order.
BUG=50548
TEST=compiles
Review URL: http://codereview.chromium.org/3203008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57434 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3129007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56053 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- move filename generation parts and related code out of DownloadManager
download_util is not the best place for it, but it's better than
DownloadManager which we're trying to minimize
- clean up posting tasks to different threads. There's no need to create
separate methods for that, it was cluttering the file needlessly
- other minor cleanups, like using static_cast instead of C-style cast
TEST=unit_tests, browser_tests, ui_tests
BUG=48913
Review URL: http://codereview.chromium.org/3043048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55088 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=49268, 49307
TEST=valgrind bots should be green on DownloadManagerTest
Review URL: http://codereview.chromium.org/3038012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53314 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=27687, 28928
TEST=DownloadManagerTest.DownloadRenameTest
Review URL: http://codereview.chromium.org/2877008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53149 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/2825056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52850 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's hard to find things in the download directory. DownloadFile and DownloadFileManager
were bundled together. Similarly for DownloadItem and DownloadManager, which was much less
intuitive. Some 3-5 line structs were also in one bag with something else. I extracted them
to their own small file.
TEST=unit_tests, browser_tests, ui_tests
BUG=48913
Review URL: http://codereview.chromium.org/2806054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52749 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check if the generated file extension is in the auto-open list. If so, don't bother displaying the save as dialog even if the always prompt for download option is on.
Original patch by James Simonsen (see http://codereview.chromium.org/2910003 ), r=me.
BUG=18587
TEST=Turn on prompt for download option. Mark a filetype as always open. Download a file of that type and make sure no dialog appears.
Review URL: http://codereview.chromium.org/2823043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52559 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
directory.
BUG=None
TEST=trybots
Review URL: http://codereview.chromium.org/2657003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49024 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
might not be a perfect solution right now, but its a simple stopgap.
BUG=chromium-os:3242
TEST=none
Review URL: http://codereview.chromium.org/2077006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47549 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=37007
TEST=unit_tests --gtest_filter=DownloadManagerTest.*
Review URL: http://codereview.chromium.org/660297
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40479 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/553153
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38004 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/351029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36378 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Haven't tested outside of mac yet, so the guard for GetSafeFilename is still present for linux. Trybot should be run to make sure it passed in Win.
BUG=21632
TEST=none
Review URL: http://codereview.chromium.org/296001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29797 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
so we can do basic UTF8/16/32 conversions without linking all of ICU.
Change callers who used to call SysUTF8ToWide/SysWideToUTF8 in base to using
these new functions. I will remove the Sys versions of these functions in a
later patch.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/243102
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28219 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly lots of #ifdefs tracking platform behaviors.
I tried to make the logic correct for Mac, too, but I didn't enable
Mac here.
BUG=21632
Review URL: http://codereview.chromium.org/220025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27260 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for file download via context-menu.
For a download initiated with a click on a link in a web page, a webkit-side change is necessary, which will be done later.
Add a field (referrer_charset) to URLRequestContext and DownloadCreateInfo. It's set to the character encoding of a document where the download request originates from when it's known (download initiated via "save as" in the context menu).
If it's not known (a download initiated by clicking on a download link or typing a url directly to the omnibox), it's initialized to the default character encoding in the user's preference. I guess this is marginally better than leaving it empty (in that case, step 2b below will be skipped and step 2c will be taken) because a user has a better control over how raw 8bit characters in C-D are interpreted (especially on Windows where a reboot is required to change the OS default codepage).
This is later passed to GetSuggestedFilename and used as one of fallback encodings (1. UTF-8, 2. origin_charset, 3. default OS codepage). With this change, we support the following:
1. RFC 2047
2. Raw-8bit-characters : a. UTF-8, b. origin_charset, c. default os codepage.
3. %-escaped UTF-8.
In this CL, for #3, I didn't add a fallback similar to one used for #2. If necessary, it can be added easily. New entries are added to 3 existing tests. What's previously not covered (raw 8bit Content-Disposition header) is now covered in all 3 tests.
BUG=1148
TEST=net unit test: NetUtilTest.GetFileNameFromCD
NetUtilTest.GetSuggestedFilename
unittest : DownloadManagerTest.TestDownloadFilename
Review URL: http://codereview.chromium.org/83002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15113 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
"reg" was getting saved with extension "download" instead.
Issue=7337
Review URL: http://codereview.chromium.org/58007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13361 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
with mime_type "application/x-tar".
BUG=5772
Review URL: http://codereview.chromium.org/42622
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12509 0039d316-1c4b-4281-b951-d872f2087c98
|