summaryrefslogtreecommitdiffstats
path: root/content/browser/download
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove some constant spew in unit test logserg@chromium.org2012-04-111-4/+5
| | | | | | | | | | BUG=44565 TEST=none Review URL: http://codereview.chromium.org/9960073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131729 0039d316-1c4b-4281-b951-d872f2087c98
* TabContents -> WebContentsImpl, part 1.avi@chromium.org2012-04-106-31/+24
| | | | | | | | | | BUG=105875 TEST=no change Review URL: http://codereview.chromium.org/10024034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131571 0039d316-1c4b-4281-b951-d872f2087c98
* Revert blocking of file: downloads.rdsmith@chromium.org2012-04-021-2/+1
| | | | | | | | | | | | BUG=120280 BUG=120604 BUG=119129 TEST=Manually drag an extension into the browser; it should try to install. Review URL: http://codereview.chromium.org/9963028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130191 0039d316-1c4b-4281-b951-d872f2087c98
* Fix race in GData downloads for small files where the download may complete ↵asanka@chromium.org2012-03-282-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | before the upload has started causing the uploaded file to not be stored to cache. 1. Prevent a download from completing if the associated GData upload hasn't started yet. This ensures proper sequencing of StoreToCache() after the downloads system has released the downloaded file. 2. Begin uploading once all the downloaded data has been saved. For smaller downloads, this ensures that the upload starts as soon as all the data is available. 3. Use the correct path when storing downloaded file to cache. The download file is renamed to its final name when the download completes. StoreToCache() should only be called with the final name. Otherwise the store operation fails. 4. Ensure an OnDownloadUpdated() notification is sent when all the data has been saved. For small downloads, this guarantees that at least one OnDownloadUpdated() notification fulfills all requirements for starting a GData upload as verified by GDataDownloadObserver::ShouldUpload(). BUG=chromium-os:28414 TEST=Manual. Downloading a small file to Docs/ completes successfully and causes the file to appear in the file manager. Review URL: http://codereview.chromium.org/9861023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129376 0039d316-1c4b-4281-b951-d872f2087c98
* GData save package support with MHTML.achuith@chromium.org2012-03-271-0/+2
| | | | | | | | | | | | | | | * Introduce SavePackageFilePickerChromeOS, which derives from SavePackageFilePicker. * For gdata targets, we save the selected path, create a temporary mhtml file using WebContents::GenerateMHTML, and call GDataFileSystem::TransferFile to transfer the file to gdata. * For non-gdata targets, we just generate the mhtml file in place. * DownloadObserver::GetGDataTempDownloadPath is a static helper method to create a temporary gdata download file, used by SavePackageFilePickerChromeOS and DownloadFilePickerChromeOS. BUG=chromium-os:28210 TEST=Go to a web page, use Save As, or ctrl-s to save a page to docs. TBR=rdsmith@chromium.org Review URL: https://chromiumcodereview.appspot.com/9809011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129115 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 129018 - Revert 128993 - Refactor BaseTimer to avoid spamming the ↵jbates@chromium.org2012-03-272-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MessageLoop with orphaned tasks. This change maintains the same API promises*, but instead of orphaning tasks when they are stopped, the BaseTimer_Helper class holds on to the task until either (1) it expires or (2) the user requests a delay that would arrive earlier than the pending task. If the user requests a longer delay than the pending task, a followup task will be posted when the pending task fires to span the remaining time. * The one change of usage is related to threading. The threading requirements are now more strict. It is not allowed to destruct a timer on a different thread than the one used to post tasks. A thread ID DCHECK is now in place that will help catch misuse. Some existing instances are changed as part of this CL. A side effect of this change is that the BaseTimer and DelayTimer are simplified to use features of BaseTimer_Helper (which is now called Timer). As suggested in timer.h, I ran the disabled TimerTest tests from linux, and they pass consistently. I also added some new tests to verify correct run states. BUG=117451,103667,119714,119750 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=128412 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=128506 Review URL: https://chromiumcodereview.appspot.com/9655006 TBR=jbates@chromium.org Review URL: https://chromiumcodereview.appspot.com/9791009 TBR=aa@chromium.org Review URL: https://chromiumcodereview.appspot.com/9860014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129062 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 128993 - Refactor BaseTimer to avoid spamming the MessageLoop with ↵aa@chromium.org2012-03-262-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | orphaned tasks. This change maintains the same API promises*, but instead of orphaning tasks when they are stopped, the BaseTimer_Helper class holds on to the task until either (1) it expires or (2) the user requests a delay that would arrive earlier than the pending task. If the user requests a longer delay than the pending task, a followup task will be posted when the pending task fires to span the remaining time. * The one change of usage is related to threading. The threading requirements are now more strict. It is not allowed to destruct a timer on a different thread than the one used to post tasks. A thread ID DCHECK is now in place that will help catch misuse. Some existing instances are changed as part of this CL. A side effect of this change is that the BaseTimer and DelayTimer are simplified to use features of BaseTimer_Helper (which is now called Timer). As suggested in timer.h, I ran the disabled TimerTest tests from linux, and they pass consistently. I also added some new tests to verify correct run states. BUG=117451,103667,119714,119750 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=128412 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=128506 Review URL: https://chromiumcodereview.appspot.com/9655006 TBR=jbates@chromium.org Review URL: https://chromiumcodereview.appspot.com/9791009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129018 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor BaseTimer to avoid spamming the MessageLoop with orphaned tasks.jbates@chromium.org2012-03-262-6/+10
| | | | | | | | | | | | | | | | | | | | This change maintains the same API promises*, but instead of orphaning tasks when they are stopped, the BaseTimer_Helper class holds on to the task until either (1) it expires or (2) the user requests a delay that would arrive earlier than the pending task. If the user requests a longer delay than the pending task, a followup task will be posted when the pending task fires to span the remaining time. * The one change of usage is related to threading. The threading requirements are now more strict. It is not allowed to destruct a timer on a different thread than the one used to post tasks. A thread ID DCHECK is now in place that will help catch misuse. Some existing instances are changed as part of this CL. A side effect of this change is that the BaseTimer and DelayTimer are simplified to use features of BaseTimer_Helper (which is now called Timer). As suggested in timer.h, I ran the disabled TimerTest tests from linux, and they pass consistently. I also added some new tests to verify correct run states. BUG=117451,103667,119714,119750 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=128412 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=128506 Review URL: https://chromiumcodereview.appspot.com/9655006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128993 0039d316-1c4b-4281-b951-d872f2087c98
* Disable downloads from "file:" or "data:" URLs.rdsmith@chromium.org2012-03-241-0/+6
| | | | | | | | | | BUG=119129 Review URL: http://codereview.chromium.org/9762002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128744 0039d316-1c4b-4281-b951-d872f2087c98
* Mark GData downloads as temporary.asanka@chromium.org2012-03-243-2/+11
| | | | | | | | | | | | | | | | | | | This patch does the following: 1. Allow DownloadItems to transition to temporary downloads after they are created. 2. Prevent temporary downloads from affecting the last download directory. The last download directory is used as the default for subsequent "Save as" downloads. 3. Disable "Open when complete" and "Always open files of this type" for temporary downloads. 4. Mark GData downloads as temporary. BUG=none TEST=GData downloads don't show up in history and are removed automatically from the shelf Review URL: http://codereview.chromium.org/9796010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128682 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Refactor BaseTimer to avoid spamming the MessageLoop with orphaned ↵rnk@chromium.org2012-03-232-10/+6
| | | | | | | | | | | | | | tasks." This reverts commit r128412, which is causing DCHECKs in thread destruction in media unittests. BUG=119714,119750 TBR=sky@chromium.org,petermayo@chromium.org Review URL: https://chromiumcodereview.appspot.com/9839059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128506 0039d316-1c4b-4281-b951-d872f2087c98
* Rename and move TestTabContents to content::TestWebContents.joi@chromium.org2012-03-231-1/+1
| | | | | | | | | BUG=98716 Review URL: http://codereview.chromium.org/9839010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128499 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor BaseTimer to avoid spamming the MessageLoop with orphaned tasks.jbates@chromium.org2012-03-232-6/+10
| | | | | | | | | | | | | | | | This change maintains the same API promises*, but instead of orphaning tasks when they are stopped, the BaseTimer_Helper class holds on to the task until either (1) it expires or (2) the user requests a delay that would arrive earlier than the pending task. If the user requests a longer delay than the pending task, a followup task will be posted when the pending task fires to span the remaining time. * The one change of usage is related to threading. The threading requirements are now more strict. It is not allowed to destruct a timer on a different thread than the one used to post tasks. A thread ID DCHECK is now in place that will help catch misuse. Some existing instances are changed as part of this CL. A side effect of this change is that the BaseTimer and DelayTimer are simplified to use features of BaseTimer_Helper (which is now called Timer). As suggested in timer.h, I ran the disabled TimerTest tests from linux, and they pass consistently. I also added some new tests to verify correct run states. BUG=117451,103667 Review URL: http://codereview.chromium.org/9655006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128412 0039d316-1c4b-4281-b951-d872f2087c98
* Add abstractions that let embedders drive tests of WebContents, without ↵joi@chromium.org2012-03-221-6/+6
| | | | | | | | | | | | | | | exposing the internals of content/. A separate WebContentsTester interface is used. For reasons this approach was chosen, see comments on the interface. As part of this work, removed a bunch of references to TabContents from Chrome, some of which were true usages (leaked to Chrome via the test_tab_contents.h header), others of which were just forward declarations and never used. Also removed a chunk of code from autofill_manager.cc that isn't called from anywhere that referenced TabContents. TBR=ben@chromium.org BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9706012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128198 0039d316-1c4b-4281-b951-d872f2087c98
* Add new danger type for uncommon or unknown downloads.asanka@chromium.org2012-03-162-2/+4
| | | | | | | | | BUG=102540 TEST=Downloading a binary that is marked by the safe browsing service as uncommon should show the uncommon download warning. Review URL: https://chromiumcodereview.appspot.com/9621007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127093 0039d316-1c4b-4281-b951-d872f2087c98
* Test file errors in downloads.ahendrickson@chromium.org2012-03-143-7/+24
| | | | | | | | | | | Uses an error injection technique to simulate hard-to-reproduce file system errors. BUG=None TEST=None Review URL: http://codereview.chromium.org/9426029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126732 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite DownloadManagerImpl::InProgressCount to actually look at the items' ↵benjhayden@chromium.org2012-03-131-1/+11
| | | | | | | | | | | | | states Sheriffs! If DownloadsApiTest is failing, please let me disable it with http://codereview.chromium.org/9694006 instead of rolling this back. If DownloadsApiTest is passing, then I'll instead use that CL to disable console.debug in test.js. BUG=101170 Review URL: http://codereview.chromium.org/9663011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126449 0039d316-1c4b-4281-b951-d872f2087c98
* Move download_types.h to content/public and rename it to match the one ↵jam@chromium.org2012-03-138-72/+11
| | | | | | | | | struct that's in it. Also move that struct to the content namespace. BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9694044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126435 0039d316-1c4b-4281-b951-d872f2087c98
* Added callback to DownloadUrl() so we can find download failures where the ↵ahendrickson@chromium.org2012-03-126-31/+51
| | | | | | | | | | | | | download item isn't created at all. Added observer class for browser tests, which uses the callback. BUG=117033 TEST=None Review URL: http://codereview.chromium.org/9570005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126251 0039d316-1c4b-4281-b951-d872f2087c98
* Move all the test URLRequestJobs to content/test/net.jam@chromium.org2012-03-122-11/+3
| | | | | | | BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9688008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126165 0039d316-1c4b-4281-b951-d872f2087c98
* Add content/public/browser/resource_dispatcher_host.hdarin@chromium.org2012-03-1212-97/+82
| | | | | | | | R=jam@chromium.org TBR=willchan@chromium.org,mirandac@chromium.org,ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/9648020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126089 0039d316-1c4b-4281-b951-d872f2087c98
* Move DownloadPersistentStoreInfo to content\public\browser and into the ↵jam@chromium.org2012-03-116-125/+8
| | | | | | | | | | content namespace. BUG=98716 TBR=joi Review URL: https://chromiumcodereview.appspot.com/9666042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126083 0039d316-1c4b-4281-b951-d872f2087c98
* Remove download_file_manager.h include from chrome. It was there because of ↵jam@chromium.org2012-03-103-10/+46
| | | | | | | | | a browser test. Instead I added a static method to the DownloadManager interface (i.e. an embedder's interface to the download system) to check that all internal objects show no downloads. I also removed the testing methods on the interface since the unittest (in content) can just create the impl directly. BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9663015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125953 0039d316-1c4b-4281-b951-d872f2087c98
* Move download interrupt reasons to content\public (the enum that's used by ↵jam@chromium.org2012-03-0818-205/+113
| | | | | | | | | chrome). The rest keep in content. BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9639001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125527 0039d316-1c4b-4281-b951-d872f2087c98
* Add ResourceRequestInfo.darin@chromium.org2012-03-071-3/+4
| | | | | | | | | | | | | | | | ResourceRequestInfo exposes the members of ResourceDispatcherHostRequestInfo required by src/chrome. ResourceDispatcherHostRequestInfo remains for use by src/content (maybe it should have a different name), and ResourceDispatcherHostRequestInfo subclasses ResourceRequestInfo. ResourceDispatcherHost::RenderViewForRequest is removed in favor of ResourceRequestInfo::GetAssociatedRenderView(). src/chrome uses ResourceRequestInfo::ForRequest(URLRequest*) instead of ResourceDispatcherHost::InfoForRequest. Deletes DummyResourceHandler in favor of just having ~ResourceDispatcherHostRequestInfo null-test its ResourceHandler. R=jam@chromium.org TBR=mirandac@chromium.org,ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/9580002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125457 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor Pickle Read methods to use higher performance PickleIterator.jbates@chromium.org2012-03-071-2/+2
| | | | | | | | | | | | | | | | There was a lot of redundant error checking and initialization code in all Pickle Read methods because of the void** iterator type. This change replaces the void* iterator with PickleIterator, which encapsulates the read pointer so that less error checking and initialization code is needed for reading. PickleIterator has all the necessary data to do the actual reading. The advantage of having it provide Read methods (as opposed to leaving them solely in the Pickle interface) is that the callers do not need to pass around the const Pickle* once they have a PickleIterator. Followup CLs will refactor the call sites to remove const Pickle* arguments where they are now unnecessary. Then the Pickle::Read* methods can be removed entirely. The alternative approach would have been to change the Pickle::Read methods to non-const and remove the iterator parameter (making Read methods advance an internal read pointer). Unfortunately, the const Read with iterator design is entrenched throughout the chromium code, making this a much more complex change with the same performance outcome. BUG=13108 Review URL: https://chromiumcodereview.appspot.com/9447084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125447 0039d316-1c4b-4281-b951-d872f2087c98
* Add a SetDisplayName() method to DownloadItemasanka@chromium.org2012-03-073-0/+25
| | | | | | | | | | BUG=78085 TEST=unit tests Review URL: http://codereview.chromium.org/9546002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125402 0039d316-1c4b-4281-b951-d872f2087c98
* Add a DownloadItem::SetDangerType().asanka@chromium.org2012-03-073-22/+6
| | | | | | | | | | | | Then get rid of MarkUrlDangerous, MarkFileDangerous, and MarkContentDangerous. BUG=78085 TEST=Compiles Review URL: http://codereview.chromium.org/9546028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125395 0039d316-1c4b-4281-b951-d872f2087c98
* Move Render(View|Widget)Host and associated classes to content namespace.joi@chromium.org2012-03-073-0/+3
| | | | | | | | | TBR=jam@chromium.org BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9600036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125388 0039d316-1c4b-4281-b951-d872f2087c98
* Move Render(Widget|View)HostImpl to files with _impl in filename.joi@chromium.org2012-03-065-5/+5
| | | | | | | | | TBR=jam@chromium.org BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9600021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125167 0039d316-1c4b-4281-b951-d872f2087c98
* Move TabContentsDragWin to content and rename it to WebContentsDragWin.jam@chromium.org2012-03-052-9/+7
| | | | | | | BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9594012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124951 0039d316-1c4b-4281-b951-d872f2087c98
* Extract minimal RenderViewHost interface for embedders, leavingjoi@chromium.org2012-03-055-16/+18
| | | | | | | | | | | | RenderViewHostImpl for content. TBR=darin@chromium.org BUG=98716 Review URL: http://codereview.chromium.org/9473001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124941 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: IWYU for BrowserThread.thestig@chromium.org2012-03-031-3/+6
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/9558012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124852 0039d316-1c4b-4281-b951-d872f2087c98
* Replace void* with int32 for passing download_id to SelectFileDialog::Listener.achuith@chromium.org2012-03-033-27/+13
| | | | | | | | | BUG=NONE TEST=trybot runs. Review URL: http://codereview.chromium.org/9589003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124851 0039d316-1c4b-4281-b951-d872f2087c98
* Add a const overload to DownloadItem::GetExternalData().asanka@chromium.org2012-03-023-3/+21
| | | | | | | | | | BUG=78085 TEST=unit_tests Review URL: http://codereview.chromium.org/9518008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124678 0039d316-1c4b-4281-b951-d872f2087c98
* Hide MHTMLGenerationManager from chrome.jam@chromium.org2012-03-013-19/+23
| | | | | | | BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9566001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124430 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed issues with interrupting a download at the start.ahendrickson@chromium.org2012-02-253-11/+45
| | | | | | | | | | | | | Added unit tests for direct and navigated download 404 errors. BUG= 114020 TEST=Set up a server with a web page that has an invalid link. Right click on the link and select Save As to download the file. Review URL: http://codereview.chromium.org/9378035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123648 0039d316-1c4b-4281-b951-d872f2087c98
* Increase maximum value for Download.HistorySize UMA.benjhayden@chromium.org2012-02-231-3/+3
| | | | | | | | 12% of samples are greater than the current maximum value of 1024. Review URL: http://codereview.chromium.org/9432039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123364 0039d316-1c4b-4281-b951-d872f2087c98
* revert a failing debug check in DownloadManagerbenjhayden@chromium.org2012-02-231-8/+0
| | | | | | Review URL: https://chromiumcodereview.appspot.com/9456025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123310 0039d316-1c4b-4281-b951-d872f2087c98
* Add debugging checks for 96627 (DownloadManager, DownloadDatabase).benjhayden@chromium.org2012-02-231-1/+12
| | | | | | | | | https://crash/reportdetail?reportid=11e1136804b56110 Either the user's downloads sqlite table really contained the same db_handle twice, or OnPersistentStoreQueryComplete() was called twice somehow. Add checks for both. Review URL: http://codereview.chromium.org/9390020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123246 0039d316-1c4b-4281-b951-d872f2087c98
* [flaky fixlet] Fix timing issue causing console errors and WebUI tests to fail.dpapad@chromium.org2012-02-221-0/+3
| | | | | | | | | | | | Problem was that there were calls to javascript, before Dom content has loaded. BUG=104129,109262,68883 TEST=WebUIBidiCheckerBrowserTestRTL.TestDownloadsPageRTL and WebUIBidiCheckerBrowserTestLTR.TestDownloadsPageLTR should no longer be flaky. Review URL: http://codereview.chromium.org/9415027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123051 0039d316-1c4b-4281-b951-d872f2087c98
* Cancel a DownloadItem when the file selection dialog is cancelled.bauerb@chromium.org2012-02-221-6/+1
| | | | | | | | | | BUG=114196 TEST=see bug for manual test Review URL: http://codereview.chromium.org/9402011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123028 0039d316-1c4b-4281-b951-d872f2087c98
* DownloadItem::SetIsPersisted() and IsPersisted() will facilitate merging ↵benjhayden@chromium.org2012-02-213-7/+23
| | | | | | | | | | | DbHandle with Id. This is another step towards removing Set/GetDbHandle() in favor of GetId(). For now, this is a parallel mechanism for GetDbHandle() > kUninitializedHandle. There are two ways to do everything. Review URL: http://codereview.chromium.org/9358066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122843 0039d316-1c4b-4281-b951-d872f2087c98
* Add UMA stats for save package duplicate file errors.benwells@chromium.org2012-02-174-4/+75
| | | | | | | | | | | | | | | | Sometimes the save package code will try to save multiple frames with the same file name. In this case the first frame will win. Its not clear how often this happens; this change adds UMA stats so we can get a feel for this. BUG=106364 TEST=Checked save package still works, and the UMA code is triggered on the known problem site. Review URL: http://codereview.chromium.org/8805002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122462 0039d316-1c4b-4281-b951-d872f2087c98
* Isolate initiation counts for downloads to their own histograms and improverdsmith@chromium.org2012-02-153-29/+45
| | | | | | | | | | | naming. BUG=None Review URL: http://codereview.chromium.org/9316116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122159 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup DownloadFileManagerTest and add ↵asanka@chromium.org2012-02-151-60/+119
| | | | | | | | | | | | | | DownloadFileManagerTest.RenameCompletingWithUniquification test. DownloadFileManagerTest.RenameFile() wasn't being called with is_complete == true. Therefore, DownloadFileManager::RenameCompletingDownloadFile() wasn't being exercised for this test suite. Also adds some gmock expectations to silence warnings. BUG=78085 TEST=content_unittests Review URL: http://codereview.chromium.org/9389008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122094 0039d316-1c4b-4281-b951-d872f2087c98
* net: Split FileStream::Read/Write() into sync and async versions.satorux@chromium.org2012-02-151-1/+1
| | | | | | | | | | | | | | | | | | Historically, FileStream::Read/Write() used to take NULL for synchronous operations, but these are replaced with ComplocationCallback(), which is rather ugly. ReadSync() and WriteSync() which do not take a CompletionCallback are introduced for synchronous operations. Having function separate signatures make clients code cleaner, and easier to catch synchronous operations on wrong threads. This convention also matches with Open/OpenSync and Close/CloseSync. BUG=72001 TEST=try bots. Review URL: https://chromiumcodereview.appspot.com/9365024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122031 0039d316-1c4b-4281-b951-d872f2087c98
* Prefer ScopedNestableTaskAllower over manual save/restoredhollowa@chromium.org2012-02-141-3/+2
| | | | | | | | | | | | | | Cleanup. Changes various calls sites to use the ScopedNestableTaskAllower class to save/restore nestable task state. BUG=None TEST=Existing unit tests R=jar@chromium.org, scottbyer@chromium.org, sky@chromium.org, akalin@chromium.org, rsleevi@chromium.org, brettw@chromium.org, tony@chromium.org Review URL: https://chromiumcodereview.appspot.com/9384024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121914 0039d316-1c4b-4281-b951-d872f2087c98
* Use regular download mechanism to download and open plug-in installer files.bauerb@chromium.org2012-02-102-3/+4
| | | | | | | | | | | | As downloads can now be cancelled as well, add a DownloadCancelled callback to PluginInstallerObserver, and rename the others to be consistent in naming. BUG=110484 TEST=none Review URL: http://codereview.chromium.org/9370018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121439 0039d316-1c4b-4281-b951-d872f2087c98
* Define FilePath::NormalizePathSeparators on all platformskinuko@chromium.org2012-02-101-5/+1
| | | | | | | | | | | | | I assume the method FilePath::NormalizeWindowsPathSeparators() is intentionally defined only on Windows, but recently I found myself trying to add a static method (named NormalizePathSeparators()) which calls NormalizeWindowsPathSeparators() or does nothing with platform ifdefs, and then found that there's another place defining the same static method. Maybe we could just add the common method in FilePath then? It'd at least make the code cleaner at several callsites. I don't think this has visible negative performance impact with optimization build. BUG=none TEST=FilePathTest.NormalizePathSeparators and all other existing tests Review URL: https://chromiumcodereview.appspot.com/9320059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121380 0039d316-1c4b-4281-b951-d872f2087c98