summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
Commit message (Collapse)AuthorAgeFilesLines
* Regression fix: cancel all downloads when shutting down DownloadManager.phajdan.jr@chromium.org2010-09-133-9/+12
| | | | | | | | | BUG=54823 TEST=see bug Review URL: http://codereview.chromium.org/3327024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59291 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move ctors/dtors into cc files.erg@google.com2010-09-139-7/+43
| | | | | | | | | | | | | 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
* GTTF: download cleanup, rename things to be more accurate.phajdan.jr@chromium.org2010-09-108-160/+83
| | | | | | | | | | | 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
* GTTF: Clean up DownloadFileManagerphajdan.jr@chromium.org2010-09-1011-260/+153
| | | | | | | | | | | | | | | | | | | | | 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
* Implement gallery install APIrafaelw@chromium.org2010-09-091-0/+1
| | | | | | | | | | This patch implements chrome.experimental.management.install() which is only available for use by the web store. Calling with an extensionId, causes the download url to be constructed internally and downloaded and then cause the installation to bypass the normal permissions dialog. BUG=27431,54148 Review URL: http://codereview.chromium.org/3353015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58956 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 8)thestig@chromium.org2010-09-082-3/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3232003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58794 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 58196 - GTTF: Clean up DownloadFileManagerphajdan.jr@chromium.org2010-09-0710-129/+255
| | | | | | | | | | | | | | | | | | | | | | 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
* Revert 58374 - Fix a race condition after my latest download cleanup change.phajdan.jr@chromium.org2010-09-072-17/+0
| | | | | | | | | | | | | | | | We need to pause the download request until the on-disk file is actually created. Otherwise all data received from network would be discarded. BUG=54131 TEST=see bug Review URL: http://codereview.chromium.org/3333007 TBR=phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/3307015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58717 0039d316-1c4b-4281-b951-d872f2087c98
* Remove risky DISABLE_RUNNABLE_METHOD_REFCOUNT macro from DownloadManager.phajdan.jr@chromium.org2010-09-032-6/+18
| | | | | | | | | | | | Just use a NewRunnableMethod task posted to the IO thread. The RDH is guaranteed to live longer than the IO thread. BUG=48913 TEST=none Review URL: http://codereview.chromium.org/3331009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58529 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Reaplly the TabRestoreService::Observer into its own file commit.erg@google.com2010-09-021-0/+1
| | | | | | | | | | | | | This means browser.h no longer includes a large chunk of the tab restore system. Now with fixes to chromeos. BUG=none TEST=compiles First Review URL: http://codereview.chromium.org/3296003 Review URL: http://codereview.chromium.org/3358005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58382 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure DownloadManager is shut down on the UI thread.phajdan.jr@chromium.org2010-09-021-3/+7
| | | | | | | | | | | | | This fixes a pref-related crash. TBR=darin BUG=54128 TEST=memory_test and others; download a file and close the browser while it's downloading; should be no DCHECKs/segfaults Review URL: http://codereview.chromium.org/3356005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58378 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a race condition after my latest download cleanup change.phajdan.jr@chromium.org2010-09-022-0/+17
| | | | | | | | | | | | | We need to pause the download request until the on-disk file is actually created. Otherwise all data received from network would be discarded. BUG=54131 TEST=see bug Review URL: http://codereview.chromium.org/3333007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58374 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "FBTF: Move the TabRestoreService::Observer into its own file."erg@google.com2010-09-011-1/+0
| | | | | | | | | | | This reverts commit 4a76b908daffee441d9ebf9fbc74b4015d9145df (r58256) due to chromeos compile fail. TBR=akalin Review URL: http://codereview.chromium.org/3340007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58271 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move the TabRestoreService::Observer into its own file.erg@google.com2010-09-011-0/+1
| | | | | | | | | | | | This means browser.h no longer includes a large chunk of the tab restore system. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3296003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58256 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: Disable all download tests, they are broken just so much.phajdan.jr@chromium.org2010-09-011-14/+46
| | | | | | | | | | | | | | | They don't wait until the download finishes, so a "do you want to close the browser, you have pending downloads?" dialog appears, which makes buildbots leak a process and become hosed. TBR=ahendrickson BUG=35275, 48913, 50060 TEST=ui_tests Review URL: http://codereview.chromium.org/3301006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58225 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: Clean up DownloadFileManagerphajdan.jr@chromium.org2010-09-0110-255/+129
| | | | | | | | | | | | | | | | | | | 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
* FBTF: Move more ctors/dtors from headers to implementation.erg@google.com2010-09-012-0/+4
| | | | | | | | | | | | | | | | | - Adding/Moving dtors of objects that have CancelableRequestConsumers shaves three megs off browser.a. - Adding/Moving dtors of objects that have ScopedRunnableMethodFactories only shaved 100k off browser.a/renderer.a. - Adding/Moving dtors of objects that used some form of base::*Timer<> was negligible; there were only a few classes that had a Timer but had a ctor/dtor in the header after the previous cleanups. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3278006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58192 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting to see if this fixes linux ui tests hang. Just a shot in the dark ↵ananta@chromium.org2010-09-0110-129/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Disable DownloadTest.NewWindow everywhere.tim@chromium.org2010-09-011-8/+2
| | | | | | | | | BUG=44454, 50060 TBR=phajdan-jr Review URL: http://codereview.chromium.org/3302001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58107 0039d316-1c4b-4281-b951-d872f2087c98
* Disabling the DownloadTest.NewWindow for linux as it seems to consistently ↵ananta@chromium.org2010-08-311-1/+1
| | | | | | | | | | | fail there. Bug=44454 TBR=phajdan-jr Review URL: http://codereview.chromium.org/3270017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58104 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: Clean up DownloadFileManagerphajdan.jr@chromium.org2010-08-3110-255/+129
| | | | | | | | | | | | | | | | | | | 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
* Cleanup: make more PrefMember methods const.phajdan.jr@chromium.org2010-08-311-3/+2
| | | | | | | | | | | | | | | | This allows the users of PrefService to make their accessors that refer to PrefMember members const too. We use mutable for some PrefMember members, when they do not reflect the outside-visible state. Those members are used to do lazy loading of the preference values. BUG=none TEST=none Review URL: http://codereview.chromium.org/3271004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58086 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: Extract all preferences-related code from DownloadManager to ↵phajdan.jr@chromium.org2010-08-309-159/+231
| | | | | | | | | | | 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
* Convert a bunch of uses of the wstring net::FormatUrl() to the new string16 one.viettrungluu@chromium.org2010-08-301-3/+2
| | | | | | | | | BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3287002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57829 0039d316-1c4b-4281-b951-d872f2087c98
* Expand tar.gz download workaround to work for tgz as well.estade@chromium.org2010-08-282-4/+11
| | | | | | | | | BUG=52250 TEST=included Review URL: http://codereview.chromium.org/3173048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57760 0039d316-1c4b-4281-b951-d872f2087c98
* Download code cleanup: share most of the code between DownloadFile and SaveFile.phajdan.jr@chromium.org2010-08-278-354/+457
| | | | | | | | | | | | | I'm not really happy about BaseFile, but removing the remaining differences will require changes to DownloadFileManager and SaveFileManager. I prefer to do that in small steps. TEST=unit_tests, browser_tests, ui_tests BUG=48913 Review URL: http://codereview.chromium.org/3164039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57688 0039d316-1c4b-4281-b951-d872f2087c98
* Makes the download shelf auto-close after the user opens all downloadssky@chromium.org2010-08-265-10/+30
| | | | | | | | | | | | and moves mouse off the shelf. BUG=27797 TEST=on windows download an item, open it, move the mouse off the download shelf and make sure it closes. Review URL: http://codereview.chromium.org/3177034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57541 0039d316-1c4b-4281-b951-d872f2087c98
* Move prefs-related files under chrome/browser/ into a prefs/ subdir.evan@chromium.org2010-08-264-4/+4
| | | | | | | | | | | | 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
* FBTF: Minor cleanup to testing headers.erg@google.com2010-08-251-0/+1
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3136014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57345 0039d316-1c4b-4281-b951-d872f2087c98
* Convert FormatBytes to string16.evan@chromium.org2010-08-192-11/+11
| | | | | | | | | | I considered ASCII, but it's producing what is intended to be a human-readable string. For example, in theory the "bytes/s" annotation could be localized into a language where the "b" is non-ASCII. Review URL: http://codereview.chromium.org/3107021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56771 0039d316-1c4b-4281-b951-d872f2087c98
* Remove forward declares for ASCIIToUTF16 from string_util. All callers now usebrettw@chromium.org2010-08-191-0/+1
| | | | | | | | | | utf_string_conversions.h TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3148019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56719 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded STL includes from src/chrome.viettrungluu@chromium.org2010-08-191-2/+0
| | | | | | | | | | | This (re-)inspects files under src/chrome for unneeded #includes of <map>, <string>, <vector>, etc. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3152033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56653 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 6)thestig@chromium.org2010-08-191-2/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3093013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56641 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Convert FormatBytes to string16."evan@chromium.org2010-08-182-11/+11
| | | | | | This reverts commit r56603. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56608 0039d316-1c4b-4281-b951-d872f2087c98
* Convert FormatBytes to string16.evan@chromium.org2010-08-182-11/+11
| | | | | | | | | | I considered ASCII, but it's producing what is intended to be a human-readable string. For example, in theory the "bytes/s" annotation could be localized into a language where the "b" is non-ASCII. Review URL: http://codereview.chromium.org/3107021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56603 0039d316-1c4b-4281-b951-d872f2087c98
* Convert GetDisplayStringInLTRDirectionality from wstring to string16.tony@chromium.org2010-08-182-7/+9
| | | | | | | | BUG=23581 Review URL: http://codereview.chromium.org/3108027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56535 0039d316-1c4b-4281-b951-d872f2087c98
* Regression fix: Downloads page in Incognito mode works fine now.phajdan.jr@chromium.org2010-08-166-79/+80
| | | | | | | | | | | | | | | Additionally, it fixes another ancient bug that prevented downloads search from working in Incognito mode. The design of DownloadHistory is also nicer now, with no dependencies on DownloadManager. TEST=see bug BUG=51955 Review URL: http://codereview.chromium.org/3112011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56266 0039d316-1c4b-4281-b951-d872f2087c98
* TBR: joth@chromium.orgjoth@chromium.org2010-08-161-0/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56211 0039d316-1c4b-4281-b951-d872f2087c98
* Mark 2 failing tests in SavePageBrowserTest as flakyjoth@chromium.org2010-08-161-2/+2
| | | | | | TBR: joth@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56205 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove "obviously" unneeded standard C++ library #includes.viettrungluu@chromium.org2010-08-154-10/+3
| | | | | | | | | BUG=none TEST=builds Review URL: http://codereview.chromium.org/3179017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56171 0039d316-1c4b-4281-b951-d872f2087c98
* Fix suggested save file name for title-less pages.estade@chromium.org2010-08-133-61/+95
| | | | | | | | | | | regressed in r48691 BUG=51963 TEST=TODO Review URL: http://codereview.chromium.org/3150012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56091 0039d316-1c4b-4281-b951-d872f2087c98
* Convert infobar APIs to UTF-16.evan@chromium.org2010-08-133-8/+8
| | | | | | | | | | | | | | | | | The critical change is the base class in infobar_delegate.h. The remainder is just adapting all users to that change. I grepped for all instances of the three base functions whose types I changed to be more sure that I found all classes that tried to overload these functions. I sure wish C++ had an @Override annotation. :~( TEST=compiles BUG=23581 Review URL: http://codereview.chromium.org/3127009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56066 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Forward declare everything possible in testing_profile.herg@google.com2010-08-131-0/+1
| | | | | | | | | 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
* Convert TimeFormat (chrome/common/time_format.*) to string16 (from wstring).viettrungluu@chromium.org2010-08-122-40/+44
| | | | | | | | | | | (Also do some drive-bys.) BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3165009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55842 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Start cleaning up net/erg@google.com2010-08-111-0/+1
| | | | | | | | | | | | url_request.h and http_response_info.h are some of the most included headers from net/ in chrome. Do what forward declaration we can in those headers. BUG=none TEST=none Review URL: http://codereview.chromium.org/3150003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55780 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Clean up some headers in tab_contents_delegate.h.erg@google.com2010-08-101-0/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3145001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55635 0039d316-1c4b-4281-b951-d872f2087c98
* Add xbap to download extensions warning list.inferno@chromium.org2010-08-101-0/+1
| | | | | | | | | | BUG=51658 TEST=NONE TBR=cevans@chromium.org Review URL: http://codereview.chromium.org/3158001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55531 0039d316-1c4b-4281-b951-d872f2087c98
* Convert occurrences of WideToUTF{8,16}(l10n_util::GetString...() ...viettrungluu@chromium.org2010-08-082-3/+3
| | | | | | | | | | | ... to l10n::GetString...UTF{8,16}(). BUG=23581 TEST=builds and tests pass Review URL: http://codereview.chromium.org/3054052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55371 0039d316-1c4b-4281-b951-d872f2087c98
* rid of more OS_LINUX defines, to help the BSD port (work by sprewell & I)pvalchev@google.com2010-08-061-5/+5
| | | | | | Review URL: http://codereview.chromium.org/2089010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55289 0039d316-1c4b-4281-b951-d872f2087c98
* Fix DownloadUtilTest on Mac. Not sure what causes the difference.phajdan.jr@chromium.org2010-08-051-0/+8
| | | | | | | | | | | TBR=ahendrickson TEST=unit_tests BUG=48913 Review URL: http://codereview.chromium.org/3058052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55100 0039d316-1c4b-4281-b951-d872f2087c98