summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
Commit message (Collapse)AuthorAgeFilesLines
* Remove most header file dependencies on the notification type list. It isbrettw@chromium.org2009-02-012-13/+17
| | | | | | | | | | | really painful to add more types, since lots of headers include the notification service to derive from the notification observer. This splits that out, so much less of the project should end up including notification_types.h ---Paths modified but not in any changelist: Review URL: http://codereview.chromium.org/19744 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9020 0039d316-1c4b-4281-b951-d872f2087c98
* Register .crx file handler to install Chrome extensions.mpcomplete@google.com2009-01-301-2/+6
| | | | | | | Have files of that type automatically download and open. Review URL: http://codereview.chromium.org/19403 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8995 0039d316-1c4b-4281-b951-d872f2087c98
* Make the download manager compile on Linux & Mac.brettw@google.com2009-01-301-7/+1
| | | | | | Review URL: http://codereview.chromium.org/19711 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8971 0039d316-1c4b-4281-b951-d872f2087c98
* Porting in the download manager (plus tiny bits of cleanup).brettw@chromium.org2009-01-304-40/+51
| | | | | | Review URL: http://codereview.chromium.org/19697 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8951 0039d316-1c4b-4281-b951-d872f2087c98
* Disable DownloadTest.UnknownSize because it is flaky.maruel@chromium.org2009-01-291-1/+2
| | | | | | | BUG=7191 Review URL: http://codereview.chromium.org/19665 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8879 0039d316-1c4b-4281-b951-d872f2087c98
* Change URLRequest to use a ref-counted buffer for actual IO.rvargas@google.com2009-01-295-10/+20
| | | | | | | | | | This will re-land http://codereview.chromium.org/18390 BUG=5325 Review URL: http://codereview.chromium.org/19004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8847 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: gfx::NativeViewId and CrossProcessEventagl@chromium.org2009-01-271-1/+3
| | | | | | | | | | | | | | | | | | | Create a couple new typedefs for porting work. Firstly, gfx::NativeViewId is a handle to a platform specific widget in the renderer process. For Windows, this is just a HWND as before. However, in other platforms the ids used in the renderer process will be something else. CrossProcessEvent is the type of a HANDLE to a Windows event object which is used across processes. Since we aren't going to support these sorts of events on non-Windows platforms, this will have to go away at some point. For now, however, this lets us build code without too many ifdefs all over the place. Review URL: http://codereview.chromium.org/18768 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8756 0039d316-1c4b-4281-b951-d872f2087c98
* revert r8603rvargas@google.com2009-01-245-19/+10
| | | | | | Review URL: http://codereview.chromium.org/18576 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8605 0039d316-1c4b-4281-b951-d872f2087c98
* Change URLRequest to use a ref-counted buffer for actual IO.The ref-counting ↵rvargas@google.com2009-01-245-10/+19
| | | | | | | | will prevent the deletion / reuse of memorywhile the buffer is actually being used by pending IO.This seems a very intrusive change, but at least we will be ableto make sure that it works without having to chase every singledestruction of an URLRequest to make sure that any pending IOwas cancelled, and also allows us to avoid blocking onthe object destruction.BUG=5325 Review URL: http://codereview.chromium.org/18390 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8603 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bug when saving web pages that have a period in their title.paulg@google.com2009-01-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | The save dialog code attempts to generate a file extension based on the suggested name provided to it, which in the case of saving a web page is the title. If that title contains a '.' character, it treats anything that follows as the file extension and appends it to the name the user selects. For example, saving a page with the title "Google Inc. - A search engine" and the user choosing the save name as "Google" will result in the saved file being named "Google. - A search engine.htm" when it should be "Google.htm". In the case of saving a web page, we can ignore trying to figure out the file extension since we already know it will be ".htm". BUG=6105 (http://crbug.com/6105) Review URL: http://codereview.chromium.org/18699 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8569 0039d316-1c4b-4281-b951-d872f2087c98
* Move files out of browser and into either renderer_host or tab_contents.brettw@chromium.org2009-01-223-4/+4
| | | | | | | This also fixes a crash in the web contents unit test in a commented-out test and re-enable it. Review URL: http://codereview.chromium.org/18504 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8470 0039d316-1c4b-4281-b951-d872f2087c98
* Fix two bugs that resulted in misplaced downloads and missingpaulg@google.com2009-01-211-1/+1
| | | | | | | | | | | file names in the download page. BUG=6335 (crbug.com/6335 - "Download location ignored") Review URL: http://codereview.chromium.org/18388 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8342 0039d316-1c4b-4281-b951-d872f2087c98
* re-enable savepage ui testtc@google.com2009-01-161-2/+1
| | | | | | | | | | The ui tests continued to time out after this test was disabled. Looks like someone disconnected the bot and fixed something. the tests are now all passing, so I think we can re-enable. Review URL: http://codereview.chromium.org/18331 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8226 0039d316-1c4b-4281-b951-d872f2087c98
* Move functions required by the rest of the browser from RenderProcessHost to ↵brettw@chromium.org2009-01-162-2/+2
| | | | | | | | an interface and move the implementation to BrowserRenderProcessHost. This will allow me to write render view unit tests without using the actual renderer, but there are no tests yet. Review URL: http://codereview.chromium.org/18132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8188 0039d316-1c4b-4281-b951-d872f2087c98
* Removed a stray string.maruel@chromium.org2009-01-161-1/+1
| | | | | | Review URL: http://codereview.chromium.org/18317 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8179 0039d316-1c4b-4281-b951-d872f2087c98
* Disable the test SavePageTest.CleanFilenameFromPageTitle due to bug 6514.maruel@chromium.org2009-01-161-2/+3
| | | | | | Review URL: http://codereview.chromium.org/18154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8178 0039d316-1c4b-4281-b951-d872f2087c98
* Remove timeout constants from ui_tests. All tests will nowpaulg@google.com2009-01-161-1/+1
| | | | | | | | | use accessors for various timeouts which can be set (via command line parameters) to values appropriate to the test environment, such as longer timeouts when running under purify. Review URL: http://codereview.chromium.org/18109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8164 0039d316-1c4b-4281-b951-d872f2087c98
* Move a bunch of TabContents related files into a tab_contents subdirben@chromium.org2009-01-156-16/+16
| | | | | | Review URL: http://codereview.chromium.org/18250 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8058 0039d316-1c4b-4281-b951-d872f2087c98
* More ui_test purify changes.paulg@google.com2009-01-151-4/+5
| | | | | | Review URL: http://codereview.chromium.org/18069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8052 0039d316-1c4b-4281-b951-d872f2087c98
* Add a UI test to make sure we sanitize the filenametc@google.com2009-01-073-15/+95
| | | | | | | | | | | of files saved using the "Save page as..." menu item. This involves adding a new automation provider method for disabling the dialog prompting for a filename. Review URL: http://codereview.chromium.org/16555 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7683 0039d316-1c4b-4281-b951-d872f2087c98
* Convert download manager to FilePath.estade@chromium.org2009-01-068-192/+200
| | | | | | | | (Fixed up version of issue 17032. Now passes all unit tests.) Review URL: http://codereview.chromium.org/16533 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7630 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent files saved via the "Save as..." page menu item fromtc@google.com2009-01-065-12/+99
| | | | | | | | | | | | | | | | | being named maliciously. This is mainly copying some code from the download manager because it seems like a pretty large task to refactor the save-as code right now. Here's a demo page: http://ponderer.org/tests/title-with-.exe.html Clean up the naming convention of register prefs for the safe browsing service to make it more like the other register methods. Review URL: http://codereview.chromium.org/16523 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7595 0039d316-1c4b-4281-b951-d872f2087c98
* Unbreak unit tests. Revert r7564.estade@chromium.org2009-01-057-167/+160
| | | | | | | | tbr=jhawkins Review URL: http://codereview.chromium.org/16522 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7571 0039d316-1c4b-4281-b951-d872f2087c98
* * switch download manager to using FilePathestade@chromium.org2009-01-057-160/+167
| | | | | | | | | * add empty() function to FilePath * implement file_util::GetFileExtensionFromPath Review URL: http://codereview.chromium.org/17032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7564 0039d316-1c4b-4281-b951-d872f2087c98
* New attempt at landing the resource_dispatcher_host.cc splitting (broke the ↵jcampan@chromium.org2008-12-234-4/+4
| | | | | | | | | build on Friday). TBR=darin Review URL: http://codereview.chromium.org/15801 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7400 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting my CL to fix build bustage.jcampan@chromium.org2008-12-204-4/+4
| | | | | | | TBR=maruel Review URL: http://codereview.chromium.org/15099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7338 0039d316-1c4b-4281-b951-d872f2087c98
* This CL moves the different resource handlers from ↵jcampan@chromium.org2008-12-204-4/+4
| | | | | | | | | | | | | | | | resource_dispatcher_host.cc into their own files, into a new renderer_host directory. Their is no functionality change in this CL. The motivation for doing that was: - resource_dispatcher_host.cc has become very long and more than 1/3 of the code is for the resource handler. - having the resource handler in their own file allows having unit tests for them. BUG=none TEST=run all unit tests and UI tests. Review URL: http://codereview.chromium.org/14487 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7336 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/14809jcampan@chromium.org2008-12-194-15/+11
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7281 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 7149.jcampan@chromium.org2008-12-174-11/+15
| | | | | | Review URL: http://codereview.chromium.org/15004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7153 0039d316-1c4b-4281-b951-d872f2087c98
* Revamp of the interstitial pages.jcampan@chromium.org2008-12-174-15/+11
| | | | | | | | | | | | | | The interstitial is now a RVH that is displayed on top of the WebContents with no interaction with the WebContents' RenderViewHostManager. This simplifies the states that the RenderViewHostManager has. The interstitial is responsible for hiding and deleting itself when told to proceed/not proceed or when a navigation occurs or the tab is closed. The interstitial now uses a data URL (instead of loading some alternate HTML), which allowed me to remove some interstitial flags from NavigationController::LoadCommittedDetails and ProvisionalLoadDetails. Also changed tab_utils::GetTabContentsByID to return a WebContents since only WebContents have a RVH associated with them. TEST=Run all ui tests and unit tests. Review URL: http://codereview.chromium.org/13764 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7149 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup IsExecutableMimeType.abarth@chromium.org2008-12-151-17/+21
| | | | | | | | R=cpu Review URL: http://codereview.chromium.org/14417 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7004 0039d316-1c4b-4281-b951-d872f2087c98
* Once we've decided that a path doesn't exist, reserve it by creating an ↵abarth@chromium.org2008-12-122-24/+25
| | | | | | | | | | | empty file so that we don't later think that the same path doesn't exist. BUG=3662 R=paulg Review URL: http://codereview.chromium.org/13336 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6878 0039d316-1c4b-4281-b951-d872f2087c98
* We should let binary/octet-stream have an EXE extension to fix compat with ↵abarth@chromium.org2008-12-052-0/+9
| | | | | | | | | | | digsby.com and ohloh.net BUG=1573 R=darin Review URL: http://codereview.chromium.org/13165 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6424 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of kPathSeparator on windows. Port some wstring function to take ↵estade@chromium.org2008-12-042-2/+2
| | | | | | | | FilePaths. Re-enable relevant posix unit tests. Review URL: http://codereview.chromium.org/12893 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6387 0039d316-1c4b-4281-b951-d872f2087c98
* Move convolver and image_operations from base/gfx to skia/ext. This is justbrettw@google.com2008-12-031-1/+1
| | | | | | | | like my previous change except does no namespace renaming and doesn't touch skia_utils. Review URL: http://codereview.chromium.org/13080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6290 0039d316-1c4b-4281-b951-d872f2087c98
* Revert my skia file moves because of layout test failures.brettw@google.com2008-12-031-1/+1
| | | | | | Review URL: http://codereview.chromium.org/12892 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6266 0039d316-1c4b-4281-b951-d872f2087c98
* Fix issue 4829: No file extensions listed when saving imagesfinnur@google.com2008-12-032-20/+24
| | | | | | | | | | | | | | | | | | | We were not supplying a filter list for the Save As dialog. Now that we do, the user can select between, for example, say *.jpg and *.* as filters and we behave as follows: With a *.jpg filter active, user enters foo and we save the file as: foo.jpg With a *.jpg filter active, user enters foo. and we save the file as: foo..jpg (which is consistent with IE) With a *.jpg filter active, user enters foo.jpg, we save the file as: foo.jpg With a *.jpg filter active, user enters foo.jpeg, we save the file as: foo.jpeg (not foo.jpg or foo.jpeg.jpg) With a *.* filter active, we respect whatever user enters as extension, except if the filename contains one or more trailing dots then we strip out all those trailing dots. Also test filenames created when saving web pages, as opposed to images (should work as before). Review URL: http://codereview.chromium.org/12836 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6258 0039d316-1c4b-4281-b951-d872f2087c98
* Move convolver, image_operations, and skia_utils from base/gfx to skia/ext.brettw@google.com2008-12-021-1/+1
| | | | | | | | | | | This changes the namespace in those files from "gfx" to "skia". I split skia_utils into two parts, the Windows specific part is now in a separate file called skia_utils_win. There were several obsolete includes of these headers which I removed. I also removed img_resize_perftest which isn't used and has bitrotted. Review URL: http://codereview.chromium.org/12842 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6248 0039d316-1c4b-4281-b951-d872f2087c98
* Port some files in chrome/browser/ - part 1.deanm@chromium.org2008-11-251-1/+9
| | | | | | | Review URL: http://codereview.chromium.org/11402 Patch from Pawel Hajdan Jr. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6007 0039d316-1c4b-4281-b951-d872f2087c98
* Enable the encoding menu for javascript and css files. jungshik@google.com2008-11-251-1/+4
| | | | | | | | | | BUG=3565 TEST=Open a JS or CSS file by clicking a link to it in view-source and see if the encoding menu is enabled. Review URL: http://codereview.chromium.org/12619 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5982 0039d316-1c4b-4281-b951-d872f2087c98
* Change by Alex Mendes da Costa <alexmdac@google.com>beng@google.com2008-11-192-4/+27
| | | | | | | | | | | | Use the most recently used download path when displaying a "save as" dialog. Reset the download path when the user clears the download history. BUG=293 (http://code.google.com/p/chromium/issues/detail?id=293) Review URL: http://codereview.chromium.org/10743 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5674 0039d316-1c4b-4281-b951-d872f2087c98
* Adds the ability for save dialogs to take a default extension.sky@google.com2008-11-121-0/+1
| | | | | | | | | BUG=4287 TEST=see bug Review URL: http://codereview.chromium.org/10621 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5304 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug where carpet bombing dialog would come in some situations itsky@google.com2008-11-111-10/+20
| | | | | | | | | | | | should not have. BUG=4136 TEST=see bug for details, along with 4220. You should also verify that carpet bombing dialog comes up when it should. Review URL: http://codereview.chromium.org/10270 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5148 0039d316-1c4b-4281-b951-d872f2087c98
* A crasher would happen if you donwload an exe and the download has completed ↵jcampan@chromium.org2008-11-071-1/+2
| | | | | | | | | | | | | by the time the download item is created, you have the download tab opened and you press on the discard button. This is because such downloads gets added to a vector that is used to unregister the DownloadTabView as an observer. We were deleting the download item before notifying the DownloadTabView, which would cause it to access the deleted download item. BUG=4134 TEST=Open the download tab, start the download of a short exe. Click the discard button in the dangerous download prompt. Review URL: http://codereview.chromium.org/9435 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4940 0039d316-1c4b-4281-b951-d872f2087c98
* Tell the user that HTML documents can harm their computer because they can. abarth@chromium.org2008-11-052-3/+10
| | | | | | | | | | | This patch blocks all the extensions that we register. R=nsylvain BUG=1463961 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4769 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrote the clipboard API to be more concurrent. Added a helper class to ↵estade@chromium.org2008-11-051-8/+5
| | | | | | | | make it more foolproof. Updated all clients and unittests. Mac port by jeremy@chromium.org Review URL: http://codereview.chromium.org/9154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4719 0039d316-1c4b-4281-b951-d872f2087c98
* Rolling backabarth@chromium.org2008-11-041-8/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4604 0039d316-1c4b-4281-b951-d872f2087c98
* Tell the user that HTML documents can harm their computer because they can. abarth@chromium.org2008-11-041-1/+8
| | | | | | | | | | | This patch blocks all the extensions that we register. R=nsylvain BUG=1463961 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4603 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bug where languages that have a long string for thepaulg@google.com2008-10-312-2/+28
| | | | | | | | | | | | | | | | dangerous download warning cause an overlap with the label for that download's URL. We now use a locale-specific pixel value which changes the height of each download's view on the download page so that this overlap no longer happens. BUG=3824 (http://code.google.com/p/chromium/issues/detail?id=3824) Review URL: http://codereview.chromium.org/8933 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4323 0039d316-1c4b-4281-b951-d872f2087c98
* Background:nsylvain@chromium.org2008-10-311-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. We can tell chrome to "always open this type of file" when downloading. This is disabled for executable for security reasons. 2. When downloading an executable files we download a .download instead. -=-= The problem is that the "always open this type of file" is enabled for executables during the download because we check the extension of the file to know if it's an executable or not, and during download we see .download, and we don't consider it an executable. The fix is to look at the "original_name" when it's present to get the extension of the real file, not the .download. BUG:3814 Review URL: http://codereview.chromium.org/8918 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4306 0039d316-1c4b-4281-b951-d872f2087c98