summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_operation.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge 82266 - Fixed file/directory url resolution for external mount point ↵kerz@chromium.org2011-04-201-3/+34
| | | | | | | | | provider.Per Eric's request, refactored FileSystemDirURLRequestJob and FileSystemURLRequestJob classes to resolve local file system through a new operation.BUG=chromium-os:14225TEST=added new test cases to FileSystemPathManagerTest.*, added FileSystemOperationTest.TestGetLocalFilePathSuccessReview URL: http://codereview.chromium.org/6864040 TBR=zelidrag@chromium.org Review URL: http://codereview.chromium.org/6882102 git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@82372 0039d316-1c4b-4281-b951-d872f2087c98
* File API changes needed for safely passing user selected file entities from ↵zelidrag@chromium.org2011-04-161-4/+4
| | | | | | | | | | the file browser component extension to a 3rd party extension. BUG=chromium-os:11996 TEST=FileAccessPermissionsTest.FileAccessChecks Review URL: http://codereview.chromium.org/6810037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81860 0039d316-1c4b-4281-b951-d872f2087c98
* Let Pepper open FileSystem files again.ericu@google.com2011-04-161-0/+57
| | | | | | | | TEST=none [existing tests, but they're not currently run automatically] BUG=none Review URL: http://codereview.chromium.org/6850027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81837 0039d316-1c4b-4281-b951-d872f2087c98
* More filesystem cleanup: convert URL-encoded-as-FilePath to actual URL, where ericu@google.com2011-04-131-26/+61
| | | | | | | | | | | | | possible without WebKit API changes. The WebKit changes will happen in another CL. This is a resubmit of http://codereview.chromium.org/6767010/, which bounced recently. There are a few changes here that weren't there [most notably in file_system_operation_write_unittest.cc and file_system_operation.cc], but they're pretty trivial build/test fixes. Review URL: http://codereview.chromium.org/6833007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81463 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 81319 - More filesystem cleanup: convert URL-encoded-as-FilePath to ↵ericu@google.com2011-04-121-61/+26
| | | | | | | | | actual URL, where possible without WebKit API changes. The WebKit changes will happen in another CL. This is a resubmit of http://codereview.chromium.org/6767010/ [third try lucky,fourth try persistent?], which bounced most recently due to bugs manifestingonly on XP. There are a few changes here that weren't there [infile_system_operation_write_unittest.cc and file_system_operation.cc], butthey're pretty trivial build/test fixes.BUG=none TEST=noneReview URL: http://codereview.chromium.org/6821065 TBR=ericu@google.com Review URL: http://codereview.chromium.org/6836002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81320 0039d316-1c4b-4281-b951-d872f2087c98
* More filesystem cleanup: convert URL-encoded-as-FilePath to actual URL, where ericu@google.com2011-04-121-26/+61
| | | | | | | | | | | | | | | | | possible without WebKit API changes. The WebKit changes will happen in another CL. This is a resubmit of http://codereview.chromium.org/6767010/ [third try lucky, fourth try persistent?], which bounced most recently due to bugs manifesting only on XP. There are a few changes here that weren't there [in file_system_operation_write_unittest.cc and file_system_operation.cc], but they're pretty trivial build/test fixes. BUG=none TEST=none Review URL: http://codereview.chromium.org/6821065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81319 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 81028 - It broke LayoutTests/ fast/filesystem/op-copy.html on Windows ↵tkent@chromium.org2011-04-111-59/+26
| | | | | | | | | | | Release and Debug. More filesystem cleanup: convert URL-encoded-as-FilePath to actual URL, where possible without WebKit API changes. The WebKit changes will happen in another CL. This is a resubmit of http://codereview.chromium.org/6767010/, which bounced dueto a recent checkin that required a merge. There are a few changes here thatweren't there [in file_system_operation_write_unittest.cc andfile_system_operation.cc], but they're pretty trivial build/test fixes.BUG=none TEST=noneReview URL: http://codereview.chromium.org/6813066 TBR=ericu@google.com Review URL: http://codereview.chromium.org/6813072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81065 0039d316-1c4b-4281-b951-d872f2087c98
* More filesystem cleanup: convert URL-encoded-as-FilePath to actual URL, where ericu@google.com2011-04-091-26/+59
| | | | | | | | | | | | | | | | possible without WebKit API changes. The WebKit changes will happen in another CL. This is a resubmit of http://codereview.chromium.org/6767010/, which bounced due to a recent checkin that required a merge. There are a few changes here that weren't there [in file_system_operation_write_unittest.cc and file_system_operation.cc], but they're pretty trivial build/test fixes. BUG=none TEST=none Review URL: http://codereview.chromium.org/6813066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81028 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 80982, tests failing on Win XPdmichael@chromium.org2011-04-081-56/+26
| | | | | | | | | TBR=ericu BUG=None TEST=None Review URL: http://codereview.chromium.org/6821020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80991 0039d316-1c4b-4281-b951-d872f2087c98
* More filesystem cleanup: convert URL-encoded-as-FilePath to actual URL, where ericu@google.com2011-04-081-26/+56
| | | | | | | | | | | | | | | | possible without WebKit API changes. The WebKit changes will happen in another CL. This is a resubmit of http://codereview.chromium.org/6767010/, which bounced due to a recent checkin that required a merge. There are a few changes here that weren't there [in file_system_operation_write_unittest.cc and file_system_operation.cc], but they're pretty trivial build/test fixes. BUG=none TEST=none Review URL: http://codereview.chromium.org/6812040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80982 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 80833 - More filesystem cleanup: convert URL-encoded-as-FilePath to ↵ericu@google.com2011-04-071-50/+26
| | | | | | | | | actual URL, wherepossible without WebKit API changes. The WebKit changes will happen in anotherCL.BUG=noneTEST=noneReview URL: http://codereview.chromium.org/6767010 TBR=ericu@google.com Review URL: http://codereview.chromium.org/6813025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80835 0039d316-1c4b-4281-b951-d872f2087c98
* More filesystem cleanup: convert URL-encoded-as-FilePath to actual URL, whereericu@google.com2011-04-071-26/+50
| | | | | | | | | | | possible without WebKit API changes. The WebKit changes will happen in another CL. BUG=none TEST=none Review URL: http://codereview.chromium.org/6767010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80833 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the path from PlatformFileInfo; it's cleaner just to pass it along as aericu@google.com2011-03-281-4/+7
| | | | | | | | | | separate parameter, and not clutter up a base type. BUG:none TEST:none Review URL: http://codereview.chromium.org/6731033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79624 0039d316-1c4b-4281-b951-d872f2087c98
* Wired local file system support for File API. The local file system provider ↵zelidrag@chromium.org2011-03-251-1/+4
| | | | | | | | | | | | | | | currently exists for ChromeOS builds only. This CL exposes new extension permission 'fileSystem' that controls access to individual local file system elements from 3rd party extensions. Another new permission 'fileBrowserPrivate' controls access to following API call that retrieves root DOMFileSystem instance for locally exposed folders:  chrome.fileBrowserPrivate.requestLocalFileSystem(callback) BUG=chromium-os:11983 TEST=ExtensionApiTest.LocalFileSystem Review URL: http://codereview.chromium.org/6519040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79451 0039d316-1c4b-4281-b951-d872f2087c98
* Stop returning the true root path of each filesystem from openFileSystem.ericu@google.com2011-03-241-55/+180
| | | | | | | | | | | Instead, return the FileSystem URI of the root. This will make it easier to swap in different filesystem implementations. BUG=71635 TEST=Just a couple in FileSystemUtilTests, but a bunch of existing ones [this doesn't add much new functionality]. Review URL: http://codereview.chromium.org/6603034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79228 0039d316-1c4b-4281-b951-d872f2087c98
* Revive FileAPI's recursive CreateDirectory.kinuko@chromium.org2011-03-071-3/+2
| | | | | | | | | | | PPAPI's MakeDirectoryIncludingAncestors() (ppapi/cpp/dev/file_ref_dev.cc) uses recursive CreateDirectory. BUG=74841 TEST=none Review URL: http://codereview.chromium.org/6627028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77204 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce FileSystemFileUtil and -Proxy to decorate base::file_util in ↵kinuko@chromium.org2011-03-041-26/+47
| | | | | | | | | | | webkit/fileapi. BUG=74841 TEST=none Review URL: http://codereview.chromium.org/6604020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76875 0039d316-1c4b-4281-b951-d872f2087c98
* Remove FileSystemQuotaManager classkinuko@chromium.org2011-03-041-17/+11
| | | | | | | | | | | Now that we have SpecialStoragePolicy class and are going to have QuotaFileSystemUtil, I think we're ready to get rid of this class. BUG=none TEST=none Review URL: http://codereview.chromium.org/6609009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76858 0039d316-1c4b-4281-b951-d872f2087c98
* Properly return TYPE_MISMATCH_ERR for DirectoryExists/FileExistsadamk@chromium.org2011-02-251-2/+2
| | | | | | | | | | | | | | operation when the target isn't a directory/file, respectively. This matches what the File API spec says about error codes: http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#error-code-descriptions BUG=none TEST=none Review URL: http://codereview.chromium.org/6591013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76098 0039d316-1c4b-4281-b951-d872f2087c98
* Make more methods of FileSystemPathManager static and portable.kinuko@chromium.org2011-02-161-1/+1
| | | | | | | | | | | | | Changes: - Renamed StorageIdentifier to OriginIdentifier to better reflect its meaning. - Changed a few methods to take string origin identifier but not origin URL as its parameter, since in some cases it seems to be more convenient just to use the identifier string (which can be easily extracted from the path) than to call WebKit method to convert back the identifier to GURL. BUG=none TEST=FileSystemPathManagerTest.* Review URL: http://codereview.chromium.org/6483017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75077 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup SandboxedFileSystem* and merge them into FileSystem* for simplicity.kinuko@chromium.org2011-02-141-15/+145
| | | | | | | | | | | Based on our rough discussion over emails, I just went ahead and did the cleanup. BUG=none TEST=none Review URL: http://codereview.chromium.org/6471018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74786 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequestContext URLRequestContext;tfarina@chromium.org2011-01-151-2/+2
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/6338002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71522 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequest URLRequest;tfarina@chromium.org2010-11-301-1/+2
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/5384002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67762 0039d316-1c4b-4281-b951-d872f2087c98
* Make FileSystemOperation's lifetime more explicit.kinuko@chromium.org2010-11-301-12/+22
| | | | | | | | | | | | | | | In the current code calling dispatcher->DidXxx in an operation's DidXxx method MAY indirectly delete the operation itself depending on the dispatcher's implementation. I was confused by this several times and I want to make this flow more explicit. This patch lets FileSystemOperation control its lifetime by itself so that each callback dispatcher implementation does not need to take care of it. Also moved BrowserFileSystemCallbackDispatcher into file_system_dispatcher_host.cc as it's only used in it and its implementation is tightly coupled with the DispatcherHost. BUG=60243 TEST=none Review URL: http://codereview.chromium.org/4821005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67732 0039d316-1c4b-4281-b951-d872f2087c98
* Moving Entry from base::file_util_proxy namespace to within class ↵kkanetkar@chromium.org2010-11-021-3/+5
| | | | | | | | | | | | 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-20/+13
| | | | | | | | | | | | | | | | | | 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
* Switch FileSystemOperation::Write back to using FileUtilProxy::CreateOrOpen, ↵ericu@google.com2010-10-131-1/+1
| | | | | | | | | | | which returns a file handle, instead of FileUtilProxy::Create, which doesn't. BUG=59073 TEST=tests are currently disabled until the TestShell implementation goes in, but you can try WebKit/LayoutTests/fast/filesystem/file-writer-gc-blob.html in Chromium with --enable-file-system. Review URL: http://codereview.chromium.org/3758002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62436 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-2/+2
| | | | | | | | | | | | 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
* Resubmit of http://codereview.chromium.org/3476002/show but without the ↵ericu@google.com2010-10-071-9/+51
| | | | | | | | | | crashing bug. BUG=none TEST=none Review URL: http://codereview.chromium.org/3618016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61879 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61833 - Add the actual writing-files part of FileWriter.ericu@google.com2010-10-071-51/+9
| | | | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3476002 TBR=ericu@google.com Review URL: http://codereview.chromium.org/3630002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61842 0039d316-1c4b-4281-b951-d872f2087c98
* Add the actual writing-files part of FileWriter.ericu@google.com2010-10-071-9/+51
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3476002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61833 0039d316-1c4b-4281-b951-d872f2087c98
* Reapply 61613 that was reverted for false valgrind alarm.kinuko@chromium.org2010-10-071-3/+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/+3
| | | | | | | | | | | 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-3/+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/+3
| | | | | | | | | | | | | | | | | | | | | 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-3/+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-46/+55
| | | | | | | | | 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-55/+46
| | | | | | | | | | | | | | | 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-46/+55
| | | | | | | | | | | | 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 TouchFile() operation.dumi@chromium.org2010-09-271-1/+21
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3417018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60710 0039d316-1c4b-4281-b951-d872f2087c98
* This is the IPC and bits of the browser backend for FileWriter. The rest ofericu@google.com2010-09-241-0/+48
| | | | | | | | | | | | | | it's too tied together to include a small amount; this is the most-significant chunk that I could put up without making too big a changelist. The backend isn't complete, but you can see where it's going from here. BUG=none TEST=none Review URL: http://codereview.chromium.org/3440021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60396 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor some file_system classes to use chromium types instead ofdumi@chromium.org2010-09-221-53/+58
| | | | | | | | | | | WebKit API types. BUG=none TEST=none Review URL: http://codereview.chromium.org/3406008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60152 0039d316-1c4b-4281-b951-d872f2087c98
* Test shell impl for WebKit's File System API:BUG=52799TEST=nonekkanetkar@chromium.org2010-09-161-0/+192
Also refactored a bunch of code from chrome/browser to webkit/fileapi for reuse. Added class hierarchy. Test shell and browser operations now inherit from common webkit/fileapi/file_system_operation. Review URL: http://codereview.chromium.org/3186009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59616 0039d316-1c4b-4281-b951-d872f2087c98