summaryrefslogtreecommitdiffstats
path: root/base/file_util_proxy.h
Commit message (Collapse)AuthorAgeFilesLines
* Support creating temporary files for sync file operations.noelutz@google.com2011-06-131-1/+8
| | | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/7066067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88884 0039d316-1c4b-4281-b951-d872f2087c98
* iwyu: Use callback_old.h where appropriate, part 1.jhawkins@chromium.org2011-05-101-1/+1
| | | | | | | | | | | BUG=none TEST=none R=thakis@chromium.org Review URL: http://codereview.chromium.org/6985009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84725 0039d316-1c4b-4281-b951-d872f2087c98
* Base: Last set of files to use BASE_API (for base.dll)rvargas@google.com2011-03-281-1/+2
| | | | | | | | | | Note that a bunck of these files have no unit tests :( BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6747014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79633 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Copy buffers in base::FileUtilProxy::{Read,Write} to avoid memory corruption. darin@chromium.org2011-02-041-4/+6
| | | | | | | | | | | | | | | | | | If caller has called PPB_FileIO_Impl::Close() while a read or write operation is in flight, and deletes the read or write buffer, we now avoid corrupting memory. For Write, FileUtilProxy::Write simply copies the input buffer before passing control to the FILE thread. For Read, the caller no longer passes a buffer; instead, they are passed a const char* in the ReadCallback. One caller of FileUtilProxy::Read outside of PPAPI was also updated. BUG=70285 R=darin Patch by Adam Klein (adamk@chromium.org) Originally reviewed at http://codereview.chromium.org/6312040/ Review URL: http://codereview.chromium.org/6349090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73714 0039d316-1c4b-4281-b951-d872f2087c98
* Order function definitions in base/ according to the header.erg@google.com2011-01-111-14/+14
| | | | | | | | | BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6085015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70975 0039d316-1c4b-4281-b951-d872f2087c98
* Start sorting methods in class declarations.erg@google.com2011-01-071-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | A lot of our headers are a mess and aren't organized. Impose the following order on files in the base/ directory: class Blah { each public/protected/private section: typedefs; enums; static constants; ctors; dtors; methods; overridden virtual methods; data members; }; BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6081007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70749 0039d316-1c4b-4281-b951-d872f2087c98
* Moving Entry from base::file_util_proxy namespace to within class ↵kkanetkar@chromium.org2010-11-021-34/+28
| | | | | | | | | | | | base::FileUtilProxy BUG=None TEST=None Review URL: http://codereview.chromium.org/4261001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64806 0039d316-1c4b-4281-b951-d872f2087c98
* Rename FileUtilProxy::Create to EnsureFileExistskinuko@chromium.org2010-10-151-7/+19
| | | | | | | | | | | | | | | | | | per follow-up discussion on http://codereview.chromium.org/3717001/show Rename FileUtilProxy::Create to EnsureFileExists to make it clear that it doesn't open the file (or doesn't leave a file handle opened). Also fixes CreatePlatformFile to set |created| correctly when PLATFORM_FILE_CREATE flag is given (I think this is the correct behavior). BUG=none TEST=FileSystemOperationTest.* Review URL: http://codereview.chromium.org/3743004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62683 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure we close the file_handle when we create (but not open) a new filekinuko@chromium.org2010-10-111-0/+7
| | | | | | | | | | | | 1. Add FileUtilProxy::Create that does not leave a file_handle opened. 2. Update the file_util_operation to use FileUtilProxy::Create instead of FileUtilProxy::CreateOrOpen so that no other tasks get queued in before we close the handle. BUG=58424,58473 TEST=fast/filesystem/ Review URL: http://codereview.chromium.org/3717001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62192 0039d316-1c4b-4281-b951-d872f2087c98
* Reapply 61613 that was reverted for false valgrind alarm.kinuko@chromium.org2010-10-071-1/+4
| | | | | | | | | | | | | Original issue: http://codereview.chromium.org/3567012/show BUG=none TEST=FileSystemOperationTest.* TBR=ericu,thestig Review URL: http://codereview.chromium.org/3603014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61771 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61613 - possible culprit for valgrind error. (Support ↵kinuko@chromium.org2010-10-061-4/+1
| | | | | | | | | | | removeRecursively and new copy/move) BUG=none TEST=none Review URL: http://codereview.chromium.org/3576017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61713 0039d316-1c4b-4281-b951-d872f2087c98
* Second try for support removeRecursively and new copy/move behaviors added ↵kinuko@chromium.org2010-10-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | to the spec recently. http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/1101.html > For a move/copy of a file on top of existing file, or a directory on > top of an existing empty directory, you get an automatic overwrite. > A move/copy of a file on top of an existing directory, or of a > directory on top of an existing file, will always fail. > A move/copy of a file or directory on top of an existing non-empty > directory will always fail. original issue: http://codereview.chromium.org/3567012 BUG=none TEST=FileSystemOperationTest.* TBR=ericu Review URL: http://codereview.chromium.org/3531012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61613 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61480 - Support removeRecursively and new copy/move behaviors added ↵kinuko@chromium.org2010-10-051-4/+1
| | | | | | | | | | | | | | | | | | | | | to the spec recently. http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/1101.html > For a move/copy of a file on top of existing file, or a directory on > top of an existing empty directory, you get an automatic overwrite. > A move/copy of a file on top of an existing directory, or of a > directory on top of an existing file, will always fail. > A move/copy of a file or directory on top of an existing non-empty > directory will always fail. BUG=32277 TEST=FileSystemOperationTest.* Review URL: http://codereview.chromium.org/3567012 TBR=kinuko@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61482 0039d316-1c4b-4281-b951-d872f2087c98
* Support removeRecursively and new copy/move behaviors added to the spec ↵kinuko@chromium.org2010-10-051-1/+4
| | | | | | | | | | | | | | | | | | | recently. http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/1101.html > For a move/copy of a file on top of existing file, or a directory on > top of an existing empty directory, you get an automatic overwrite. > A move/copy of a file on top of an existing directory, or of a > directory on top of an existing file, will always fail. > A move/copy of a file or directory on top of an existing non-empty > directory will always fail. BUG=32277 TEST=FileSystemOperationTest.* Review URL: http://codereview.chromium.org/3567012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61480 0039d316-1c4b-4281-b951-d872f2087c98
* Second try at submitting 61462.ericu@google.com2010-10-051-2/+11
| | | | | | | | | BUG=none TEST=in file_system_operation_unittest.cc Review URL: http://codereview.chromium.org/3526018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61468 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61462 - Add truncate and cancel for FileWriter; write and more tests ↵ericu@google.com2010-10-051-11/+2
| | | | | | | | | | | | | | | will come in later CLs. This CL also contains a fair amount of plumbing for the write call itself. BUG=none TEST=none Review URL: http://codereview.chromium.org/3599011 TBR=ericu@google.com Review URL: http://codereview.chromium.org/3604006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61463 0039d316-1c4b-4281-b951-d872f2087c98
* Add truncate and cancel for FileWriter; write and more tests will come in ↵ericu@google.com2010-10-051-2/+11
| | | | | | | | | | | | later CLs. This CL also contains a fair amount of plumbing for the write call itself. BUG=none TEST=none Review URL: http://codereview.chromium.org/3599011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61462 0039d316-1c4b-4281-b951-d872f2087c98
* Adding a FileUtilProxy::TouchFile() method that takes a FilePath as andumi@chromium.org2010-09-241-0/+8
| | | | | | | | | | | | argument (instead of PlatformFile). BUG=none TEST=none Review URL: http://codereview.chromium.org/3380024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60397 0039d316-1c4b-4281-b951-d872f2087c98
* Adding some functions that operate on file handles.dumi@chromium.org2010-09-101-0/+51
| | | | | | | | | | TEST=platform_file_unittest.cc BUG=none TBR=darin Review URL: http://codereview.chromium.org/3354020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59041 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 59007 - Adding some utility functions that work on file handles, and ↵dumi@chromium.org2010-09-091-51/+0
| | | | | | | | | | | | | | | | | adding the corresponding relays to file_util_proxy. BUG=none TEST=none Review URL: http://codereview.chromium.org/3303007 TBR=dumi@chromium.org Review URL: http://codereview.chromium.org/3371011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59013 0039d316-1c4b-4281-b951-d872f2087c98
* Adding some utility functions that work on file handles, and addingdumi@chromium.org2010-09-091-0/+51
| | | | | | | | | | | | the corresponding relays to file_util_proxy. BUG=none TEST=none Review URL: http://codereview.chromium.org/3303007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59007 0039d316-1c4b-4281-b951-d872f2087c98
* Add recursive flag to file_util_proxy::CreateDirectory.kinuko@chromium.org2010-09-081-0/+1
| | | | | | | | | BUG=54352 TEST=all the FileSystemOperationTest.TestCreateDir* should continue to pass Review URL: http://codereview.chromium.org/3293009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58781 0039d316-1c4b-4281-b951-d872f2087c98
* Moving file_util::FileInfo to base::PlatformFileInfo, and adding thedumi@chromium.org2010-09-031-5/+2
| | | | | | | | | | | | last_accessed and creation_time fields. BUG=none TEST=none Review URL: http://codereview.chromium.org/3347005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58454 0039d316-1c4b-4281-b951-d872f2087c98
* Change file_util_proxy::Entry::isDirectory to is_directory.kinuko@chromium.org2010-09-021-2/+4
| | | | | | | | | BUG=54228 TEST=none, just code cleanup Review URL: http://codereview.chromium.org/3357003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58415 0039d316-1c4b-4281-b951-d872f2087c98
* Changes for browser-side implementation for file api.kkanetkar@chromium.org2010-09-021-14/+61
| | | | | | | | | | BUG=32277 TEST=Separate CL for unit test. Review URL: http://codereview.chromium.org/3212002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58312 0039d316-1c4b-4281-b951-d872f2087c98
* Add an optional parameter to CreatePlatformFile() to report the typedumi@chromium.org2010-08-311-4/+7
| | | | | | | | | | | | of error that occured while trying to open/create a file. TEST=none BUG=none Review URL: http://codereview.chromium.org/3223007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58045 0039d316-1c4b-4281-b951-d872f2087c98
* Support handling blob URL and resolve blob references in upload data.jianli@chromium.org2010-08-311-0/+14
| | | | | | | | | BUG=none TEST=unittest Review URL: http://codereview.chromium.org/3282003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57938 0039d316-1c4b-4281-b951-d872f2087c98
* Change the FileUtilProxy callbacks to report error codes instead of booleans.dumi@chromium.org2010-08-241-11/+11
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3165050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57228 0039d316-1c4b-4281-b951-d872f2087c98
* Moving file_system_proxy to base/ and changing it to work with ↵dumi@chromium.org2010-08-201-0/+64
MessageLoopProxies instead of ChromeThreads. BUG=none TEST=none Review URL: http://codereview.chromium.org/3131026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56923 0039d316-1c4b-4281-b951-d872f2087c98