summaryrefslogtreecommitdiffstats
path: root/content/browser/download/base_file.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fixed content::BaseFile::IsEmptyHash call to memset.joaodasilva@chromium.org2013-12-191-4/+4
| | | | | | | | | | | | The call to memset is meant to compare 32 bytes from the input string against a known string. The constant 32 was stored in kSha256HashLen, however the call to memset passed "sizeof(kSha256HashLen)" instead of simply "kSha256HashLen" as the string size. This meant that only the first 4 or 8 bytes of the string were being compared, instead of the expected 32. Credit to sl@conew.com for reporting on chromium-discuss. BUG=None Review URL: https://codereview.chromium.org/109793016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241975 0039d316-1c4b-4281-b951-d872f2087c98
* Move directory creation functions to base namespace.brettw@chromium.org2013-12-031-1/+1
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/100573002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238446 0039d316-1c4b-4281-b951-d872f2087c98
* Move temp file functions to base namespace.brettw@chromium.org2013-12-031-2/+2
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/99923002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238427 0039d316-1c4b-4281-b951-d872f2087c98
* [Downloads] Move client guid for AV scanning of downloaded files to chrome/gbillock@chromium.org2013-08-101-0/+4
| | | | | | | | This client app should not be used by all clients of content/. Moving to chrome so it can be managed there and re-used if needed. Review URL: https://chromiumcodereview.appspot.com/21355004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216843 0039d316-1c4b-4281-b951-d872f2087c98
* Rename base::Delete to base::DeleteFilebrettw@chromium.org2013-07-161-1/+1
| | | | | | | | | | | Also renames DeleteAfterReboot to DeleteFileAfterReboot, and removes FileUtilProxy::RecursiveDelete which was never called. BUG= R=shess@chromium.org Review URL: https://codereview.chromium.org/18584011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211822 0039d316-1c4b-4281-b951-d872f2087c98
* Move file_util::Delete to the base namespacebrettw@chromium.org2013-07-011-1/+1
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/16950028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209475 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in content/browser/, part 1.avi@chromium.org2013-06-111-1/+1
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16755004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205449 0039d316-1c4b-4281-b951-d872f2087c98
* downloads: Improve download rate estimation.cbentzel@chromium.org2013-05-291-11/+0
| | | | | | | | | | | | | | | Previously, download rate was estimated as bytes_received/(current_time - download_start_time) Although simple, this would react slowly to dynamic changes in download time, or user initiated pauses. With this change, a ring buffer of the past 10 seconds of download time is used instead, and estimates are derived from that. It handles dynamic changes to bandwidth well. Pauses are handled reasonably well, as estimates are accurate after ten seconds - a better solution would be to clear the data rates when the user resumes from a pause. The main downside with this approach is it takes about 100 bytes of memory per active download, as well as adds some complexity. BUG=16390 TEST=content_unittests Review URL: https://chromiumcodereview.appspot.com/14697023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202874 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>.erg@chromium.org2013-04-171-4/+4
| | | | | | | | | | | In r174057, ajwong@ added support for implicit testing to scoped_ptr<>. Removes these in content/. BUG=232084 Review URL: https://codereview.chromium.org/14081010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194608 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-2/+2
| | | | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193020 Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193040 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Rewrite std::string("") to std::string(), Linux edition."dcheng@chromium.org2013-04-091-2/+2
| | | | | | | | | | | | | | This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6. Revert "Fix build after r193020." This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a. Revert "Really fix build after r193020." This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-2/+2
| | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193020 0039d316-1c4b-4281-b951-d872f2087c98
* Use base namespace for FilePath in content/browserbrettw@chromium.org2013-02-071-5/+5
| | | | | | Review URL: https://codereview.chromium.org/12213066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181349 0039d316-1c4b-4281-b951-d872f2087c98
* Initial CL for Downloads resumption.rdsmith@chromium.org2013-01-121-0/+18
| | | | | | | | | | | | | (Original work done by ahendrickson@chromium.org) BUG=7648 R=ahendrickson@chromium.org R=asanka@chromium.org Review URL: https://chromiumcodereview.appspot.com/11571025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176530 0039d316-1c4b-4281-b951-d872f2087c98
* net: Implement canceling of all async operations in FileStream.paivanof@gmail.com2012-11-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Canceling of async operations allows to not wait for their completion in FileStream's destructor. Other related changes include: - Got rid of FileStream::Close() and FileStream::CloseSync() methods because reuse of FileStream object doesn't make much sense, it should be destroyed instead. - Changed FileStream to always acquire ownership of the PlatformFile it was given. Fixed usages of FileStream where no ownership was assumed, introduced new helper functions in base/platform_file.h on the way. - FileStream's destructor now always closes the file. If file was opened with PLATFORM_FILE_ASYNC then actual closing is done asynchronously, destructor doesn't wait for that and returns immediately. When file was opened without PLATFORM_FILE_ASYNC closing is done synchronously and the thread doing that should be allowed to do IO operations. - Implementation of FileStream is refactored. FileStream is now just a wrapper around internal object that does all actual work and that can be easily orphaned in the destructor to not block on the actual file descriptor closing. All platform-independent code is extracted into a special file and amount of platform-dependent code is minimized. BUG=115067, 112474 TEST=net_unittests Review URL: https://chromiumcodereview.appspot.com/10701050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166091 0039d316-1c4b-4281-b951-d872f2087c98
* Handle the case where IAttachmentExecute::Save() deletes a downloaded file.asanka@chromium.org2012-10-291-1/+2
| | | | | | | | | | | As a first step, mark the download as interrupted due to the file being blocked or due to the file being infected by a virus. The interrupt reason will be shown to the user in the downloads shelf and the downloads page. BUG=155957 Review URL: https://chromiumcodereview.appspot.com/11150027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164632 0039d316-1c4b-4281-b951-d872f2087c98
* Move download code to the content namespace.jam@chromium.org2012-10-261-37/+32
| | | | | | Review URL: https://codereview.chromium.org/11320016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164439 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor BaseFile methods to return a DownloadInterruptReason instead of a ↵asanka@chromium.org2012-10-251-300/+101
| | | | | | | | | | | | net::Error. Also split the implementation into platform specific files. BUG=157245 Review URL: https://chromiumcodereview.appspot.com/11238044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163983 0039d316-1c4b-4281-b951-d872f2087c98
* Replace the DownloadFileManager with direct ownership of DownloadFileImplrdsmith@chromium.org2012-10-181-6/+5
| | | | | | | | | | | | | | | by DownloadItemImpl. Relanding of http://codereview.chromium.org/10799005. BUG=123998 R=benjhayden@chromium.org R=jam@chromium.org Review URL: https://chromiumcodereview.appspot.com/10912173 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162786 0039d316-1c4b-4281-b951-d872f2087c98
* Shift passage of FileStream in downloads system to be by scoped_ptr<>.rdsmith@chromium.org2012-10-171-2/+2
| | | | | | | | | | | | | | | | http://codereview.chromium.org/10912173/ constructs the DownloadFile, and thus the BaseFile, on the UI thread and then passes it to the FILE thread. DownloadFile / BaseFile may be constructed with a FileStream to which to write the download. The FileStream cannot be passed by linked_ptr<> in this case, as that is not thread safe. BUG=123998 R=benjhayden@chromium.org Review URL: https://chromiumcodereview.appspot.com/11028131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162411 0039d316-1c4b-4281-b951-d872f2087c98
* Flush at the end of local file writing in FileWriter API.kinaba@chromium.org2012-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL ensures the written content is flushed physically before fileWriter.write() invokes the "onwriteend" event, for native local files. Remote files (Google Drive files in Chrome OS) nor FileSystem API files (in PERSISTENT or TEMPORARY storage) aren't affected. The summary of the changes: * Call Flush() before the final callback. (webkit/fileapi/file_writer_delegate.cc) * Delegate Flush() to net::FileStream::Flush (webkit/fileapi/local_file_stream_writer.cc) * No-op implementation for Flush(). (webkit/fileapi/sanbox_file_stream_writer.cc) (webkit/chromeos/fileapi/remote_file_stream_writer.cc) * Implementation of asynchronous Flush. (net/base/file_stream_{posix,win}.cc) * Other files are just for reflecting the rename Flush -> FlushSync. BUG=144790 R=willchan@chromium.org,kinuko@chromium.org,benjhayden@chromium.org TBR=marja@chromium.org TEST=out/Debug/browser_tests --gtest_filter='*FileSystemApi*' TEST=./webkit/tools/layout_tests/run_webkit_tests.sh fast/filesystem TEST=Manual steps reported in the issue. Review URL: https://codereview.chromium.org/10986045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159454 0039d316-1c4b-4281-b951-d872f2087c98
* Use the user's preferred downloads directory for creating the initial ↵asanka@chromium.org2012-09-151-5/+10
| | | | | | | | | | | download file. BUG=132240 Review URL: https://chromiumcodereview.appspot.com/10905284 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157022 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 154294 - Remove DownloadFileManager in favor of direct ownership of ↵rdsmith@chromium.org2012-08-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | DownloadFiles. This CL is equivalent to CLs * http://codereview.chromium.org/10799005, * http://codereview.chromium.org/10836293, * https://chromiumcodereview.appspot.com/10823406, and * http://codereview.chromium.org/10867065 which were previous attempts to land the same functionality. R=benjhayden@chromium.org TBR=jam@chromium.org BUG=123998 BUG=144751 Review URL: https://chromiumcodereview.appspot.com/10900010 TBR=rdsmith@chromium.org Review URL: https://chromiumcodereview.appspot.com/10918024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154445 0039d316-1c4b-4281-b951-d872f2087c98
* Remove DownloadFileManager in favor of direct ownership of DownloadFiles.rdsmith@chromium.org2012-08-301-1/+0
| | | | | | | | | | | | | | | | | | | | | This CL is equivalent to CLs * http://codereview.chromium.org/10799005, * http://codereview.chromium.org/10836293, * https://chromiumcodereview.appspot.com/10823406, and * http://codereview.chromium.org/10867065 which were previous attempts to land the same functionality. R=benjhayden@chromium.org TBR=jam@chromium.org BUG=123998 BUG=144751 Review URL: https://chromiumcodereview.appspot.com/10900010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154294 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 153563 - Remove DownloadFileManager in favor of direct ownership of ↵isherman@chromium.org2012-08-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | DownloadFiles. This CL appears to have caused SavePageBrowserTest.SaveViewSourceHTMLOnly to fail flakily. This CL is equivalent to CLs http://codereview.chromium.org/10799005, http://codereview.chromium.org/10836293, and https://chromiumcodereview.appspot.com/10823406, which were previous attempts to land the same functionality. TBR=jam@chromium.org BUG=123998 BUG=144751 Review URL: https://chromiumcodereview.appspot.com/10867065 TBR=rdsmith@chromium.org Review URL: https://chromiumcodereview.appspot.com/10872102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153593 0039d316-1c4b-4281-b951-d872f2087c98
* Remove DownloadFileManager in favor of direct ownership of DownloadFiles.rdsmith@chromium.org2012-08-271-1/+0
| | | | | | | | | | | | | | | | | This CL is equivalent to CLs http://codereview.chromium.org/10799005, http://codereview.chromium.org/10836293, and https://chromiumcodereview.appspot.com/10823406, which were previous attempts to land the same functionality. TBR=jam@chromium.org BUG=123998 BUG=144751 Review URL: https://chromiumcodereview.appspot.com/10867065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153563 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 153221 - Remove DownloadFileManager in favor of direct ownership of ↵rdsmith@chromium.org2012-08-241-0/+1
| | | | | | | | | | | | | | | | | | | DownloadFiles. This CL is equivalent to CLs http://codereview.chromium.org/10799005 and http://codereview.chromium.org/10836293, which were previous attempts to land the same functionality. TBR=jam@chromium.org BUG=123998 Review URL: https://chromiumcodereview.appspot.com/10823406 TBR=rdsmith@chromium.org Review URL: https://chromiumcodereview.appspot.com/10878054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153229 0039d316-1c4b-4281-b951-d872f2087c98
* Remove DownloadFileManager in favor of direct ownership of DownloadFiles.rdsmith@chromium.org2012-08-241-1/+0
| | | | | | | | | | | | | | This CL is equivalent to CLs http://codereview.chromium.org/10799005 and http://codereview.chromium.org/10836293, which were previous attempts to land the same functionality. TBR=jam@chromium.org BUG=123998 Review URL: https://chromiumcodereview.appspot.com/10823406 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153221 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 152213 - Replace the DownloadFileManager with direct ownership of ↵rdsmith@chromium.org2012-08-191-0/+1
| | | | | | | | | | | | | | | | | | | | DownloadFile. This CL is a re-land of http://codereview.chromium.org/10799005, which was reverted due to test flakiness. BUG=123998 R=benjhayden@chromium.org TBR=jam@chromium.org Review URL: https://chromiumcodereview.appspot.com/10836293 BUG=143600 TBR=rdsmith@chromium.org Review URL: https://chromiumcodereview.appspot.com/10861002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152282 0039d316-1c4b-4281-b951-d872f2087c98
* Replace the DownloadFileManager with direct ownership of DownloadFile.rdsmith@chromium.org2012-08-181-1/+0
| | | | | | | | | | | | | | This CL is a re-land of http://codereview.chromium.org/10799005, which was reverted due to test flakiness. BUG=123998 R=benjhayden@chromium.org TBR=jam@chromium.org Review URL: https://chromiumcodereview.appspot.com/10836293 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152213 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 151351 - Replace the DownloadFileManager with direct ownership yutak@chromium.org2012-08-141-0/+1
| | | | | | | | | | | | | | | of DownloadFileImpl by DownloadItemImpl. BUG=123998 R=benjhayden@chromium.org Review URL: https://chromiumcodereview.appspot.com/10799005 TBR=rdsmith@chromium.org Review URL: https://chromiumcodereview.appspot.com/10827314 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151443 0039d316-1c4b-4281-b951-d872f2087c98
* Replace the DownloadFileManager with direct ownership rdsmith@chromium.org2012-08-131-1/+0
| | | | | | | | | | | | of DownloadFileImpl by DownloadItemImpl. BUG=123998 R=benjhayden@chromium.org Review URL: https://chromiumcodereview.appspot.com/10799005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151351 0039d316-1c4b-4281-b951-d872f2087c98
* Moving file_metadata files under content/browser/downloadcristian.patrasciuc@gmail.com2012-07-281-5/+3
| | | | | | | | | | | | | Some cleanup of the file_metadata files (especially for Mac OS). I moved them under content/browser/download and changed the namespace to "content" to match the Linux implementation and the style guide. I also included a small change to the Linux-related unittests. Review URL: https://chromiumcodereview.appspot.com/10821069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148910 0039d316-1c4b-4281-b951-d872f2087c98
* Added functionality such that on Linux, after downloading a file,cristian.patrasciuc@gmail.com2012-07-271-0/+5
| | | | | | | | | | | | | the source URL and referrer URL are stored as extended file attributes. Also see http://www.freedesktop.org/wiki/CommonExtendedAttributes BUG=45903 TEST=content_unittests/file_metadata_unittest_linux.cc/FileMetadataLinuxTest Review URL: https://chromiumcodereview.appspot.com/10784007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148729 0039d316-1c4b-4281-b951-d872f2087c98
* Add test for failing rename in BaseFileTest.asanka@chromium.org2012-07-121-1/+1
| | | | | | | | | | | | Also clean up temporary directory in BaseFileTest.ReadonlyBaseFile. BUG=none TEST=content_unittests Review URL: https://chromiumcodereview.appspot.com/10702130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146477 0039d316-1c4b-4281-b951-d872f2087c98
* Do the Windows source file annotation at the end of the download.rdsmith@chromium.org2012-06-261-4/+0
| | | | | | | | | | | | This can also include handoffs to anti-virus scanners. BUG=127999 R=asanka@chromium.org Review URL: https://chromiumcodereview.appspot.com/10636030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144275 0039d316-1c4b-4281-b951-d872f2087c98
* NetLogEventParameter to Callback refactoring 11. mmenke@chromium.org2012-06-141-13/+11
| | | | | | | | | | | | | Get rid of all uses of NetLog::EventParameters in all remaining locations (downloads, appcache, io thread, chrome_network_delegate. R=eroman@chromium.org,rdsmith@chromium.org,michaeln@chromium.org BUG=126243 Review URL: https://chromiumcodereview.appspot.com/10542153 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142217 0039d316-1c4b-4281-b951-d872f2087c98
* Use ByteStream in downloads system to decouple source and sink.rdsmith@chromium.org2012-06-041-7/+0
| | | | | | | | | | | BUG=123192 BUG=93006 BUG=111588 Review URL: https://chromiumcodereview.appspot.com/10392111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140328 0039d316-1c4b-4281-b951-d872f2087c98
* Make PowerSaveBlocker object an argument to DownloadFileImpl constructor rdsmith@chromium.org2012-04-191-1/+0
| | | | | | | | | | | | | so that we don't need to worry about it in unittests. BUG=110886 TEST=Run DownloadFileTest.* over an NX connection. R=benjhayden@chromium.org Review URL: http://codereview.chromium.org/10116027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132998 0039d316-1c4b-4281-b951-d872f2087c98
* Make FileStream::Seek async and add FileStream::SeekSync for sync operationkinuko@chromium.org2012-04-111-1/+1
| | | | | | | | | BUG=75548,113300 TEST=existing tests should pass Review URL: https://chromiumcodereview.appspot.com/9949011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131732 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
* 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
* net: Rename FileStream::Open/Close with OpenSync/CloseSync.satorux@chromium.org2012-02-091-2/+2
| | | | | | | | | | | | | | | | | | This is in preparation for implementing async versions of Open() and Close(). The existing clients are changed to use OpenSync/CloseSync. No logic is changed. The original patch was reverted as it broke linux_chromeos build. This patch includes fixes for the build. TEST=git try -r 121075 --bot=win,linux,mac,linux_chromeos,linux_chromeos_gtk,win_aura to confirm everything is built as before. BUG=72001 Review URL: https://chromiumcodereview.appspot.com/9373001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121202 0039d316-1c4b-4281-b951-d872f2087c98
* Back out r121064 from the trunk due to a compile failure.mark@chromium.org2012-02-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Builder%20%28dbg%29/builds/16/steps/compile/logs/stdio net: Rename FileStream::Open/Close with OpenSync/CloseSync. This is in preparation for implementing async versions of Open() and Close(). The existing clients are changed to use OpenSync/CloseSync. No logic is changed. TEST=try bots to confirm everythign is built as before. BUG=72001 Review URL: http://codereview.chromium.org/9349005 TBR=satorux@chromium.org Review URL: https://chromiumcodereview.appspot.com/9363036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121075 0039d316-1c4b-4281-b951-d872f2087c98
* net: Rename FileStream::Open/Close with OpenSync/CloseSync.satorux@chromium.org2012-02-081-2/+2
| | | | | | | | | | | | | | | | This is in preparation for implementing async versions of Open() and Close(). The existing clients are changed to use OpenSync/CloseSync. No logic is changed. TEST=try bots to confirm everythign is built as before. BUG=72001 Review URL: http://codereview.chromium.org/9349005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121064 0039d316-1c4b-4281-b951-d872f2087c98
* Added net logging to BaseFile.ahendrickson@chromium.org2012-02-051-21/+72
| | | | | | | | | | | | | | This enables net logging for BaseFile if any customer of BaseFile choose to take advantage of it -- none yet do. This is the second of 4 CLs that will enable net logging for downloads. BUG=None TEST=None Review URL: http://codereview.chromium.org/9223019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120510 0039d316-1c4b-4281-b951-d872f2087c98
* Added Net logging to FileStream.ahendrickson@chromium.org2012-02-021-1/+1
| | | | | | | | | | | | | The net logging doesn't currently do anything, but is ready if some system wants to pass it in. This is the first of 4 CLs that will enable net logging for downloads. BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/9288084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120226 0039d316-1c4b-4281-b951-d872f2087c98
* Using VLOG instead of DVLOG to display BaseFile errors.ahendrickson@chromium.org2012-01-091-3/+3
| | | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/9109040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116930 0039d316-1c4b-4281-b951-d872f2087c98
* In order to resume a download some more information needs to be gathered.ahendrickson@chromium.org2011-12-221-9/+38
| | | | | | | | | | | | | | | | | | This CL adds member data to classes to support this. It is the first of several CLs to implement download resumption. In addition hash information is propagated from DownloadFile to DownloadItem, because a new DownloadFile will be created when the download is resumed. It will also need to be persisted in order to resume across chrome runs. The plan is that data will be collected in DownloadResourceHandler::OnResponseStarted() and passed down to DownloadItem. On resume, it will pass the information from the resuming DownloadItem to ResourceDispatcherHost::BeginDownload(), which will set any required headers. BUG= 7648 TEST=None Review URL: http://codereview.chromium.org/8404049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115573 0039d316-1c4b-4281-b951-d872f2087c98
* Move download speed calculation to file thread / DownloadFile class.benwells@chromium.org2011-11-301-0/+18
| | | | | | | | | | | | | | This change doesn't change the way the calculation is performed but moves it to the file thread, in preperation for implementing a different speed calculation method. BUG=None TEST=Manually tested; automated tests needed. Review URL: http://codereview.chromium.org/8595004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112152 0039d316-1c4b-4281-b951-d872f2087c98