summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_file_util.cc
Commit message (Collapse)AuthorAgeFilesLines
* Replace FileSystemFileUtil::ReadDirectory()s to single ↵tzik@chromium.org2012-03-271-12/+0
| | | | | | | | | | | FileUtilHelper::ReadDirectory() BUG=114732 TEST='*FileSystem*' Review URL: http://codereview.chromium.org/9702108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129171 0039d316-1c4b-4281-b951-d872f2087c98
* Add 'recursive' flag to FileSystemFileUtil::CreateFileEnumerator.tzik@chromium.org2012-03-071-2/+4
| | | | | | | | | | BUG=114732 TEST=existing tests Review URL: http://codereview.chromium.org/9592027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125315 0039d316-1c4b-4281-b951-d872f2087c98
* Add FileUtileHelper and split out FileSystemFileUtil::Deletetzik@chromium.org2012-03-031-47/+0
| | | | | | | | | | BUG=114732 TEST='existing tests' Review URL: http://codereview.chromium.org/9564047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124824 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce CrossFileUtilHelper for cross-FileUtil Copy/Movekinuko@chromium.org2012-02-271-198/+0
| | | | | | | | | BUG=114732, 110121 TEST=existing tests Review URL: https://chromiumcodereview.appspot.com/9427004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123815 0039d316-1c4b-4281-b951-d872f2087c98
* Move src/dest info out of FileSystemOperationContextkinuko@chromium.org2012-02-261-146/+131
| | | | | | | | | | | | | | | | | Current FileSystemOperationContext has both src and dest path file info in it but this is making the code for cross-FileUtil operations way complex. This patch removes src/dest information from FileSystemOperationContext and instead: - introduce new FileSystemPath class, which represents a file path information in a filesystem - replace all the FilePath args in FileSystemFileUtil with FileSystemPath The resulting code still has some ugly part, and if we get rid of cross-FU operations from each FU code eventually we may end up converting FileSystemPath back to FilePath, but I think this change is not far from the way we want to go. BUG=114732, 110121 TEST=existing tests Review URL: http://codereview.chromium.org/9413009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123689 0039d316-1c4b-4281-b951-d872f2087c98
* [Refactor] to rename and re-layer the file_util stack layers.dmikurube@google.com2011-09-051-270/+208
| | | | | | | | | | | | | | | | | | | | Splits FileSystemFileUtil into two classes. 1. FileSystemFileUtil (pure virtual and non-virtual functions + functions to forward to an underlying file_util.) 2. NativeFileUtil (FileUtil for OS-native operations) Renames *FileSystemFileUtil into *FileUtil except for FileSystemFileUtil. Renames *_file_system_file_util.{cc,h} into *_file_util.{cc,h}. Renames variable *_file_system_file_util into *_file_util. BUG=none TEST=All FileAPI-related tests Review URL: http://codereview.chromium.org/7470037 Patch from Dai Mikurube <dmikurube@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99641 0039d316-1c4b-4281-b951-d872f2087c98
* Adding Size() to AbstractFileEnumeratortzik@chromium.org2011-08-301-6/+13
| | | | | | | | | | BUG=94060 TEST='ObfuscatedFileSystemFileUtil.*' Review URL: http://codereview.chromium.org/7717020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98769 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify directory path accounting.ericu@chromium.org2011-08-191-42/+35
| | | | | | | | | BUG=none TEST=existing test_shell_tests plus a new OFSFU test. Review URL: http://codereview.chromium.org/7608011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97522 0039d316-1c4b-4281-b951-d872f2087c98
* base: Rename FileEnumerator::FILE_TYPE to FileEnumerator::FileType.tfarina@chromium.org2011-08-151-3/+3
| | | | | | | | | | | | | | enum types should be named using CamelCase as class and function names, not using MACRO_STYLE. BUG=None TEST=None R=evan@chromium.org Review URL: http://codereview.chromium.org/7618037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96766 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring: Change all -FileUtils non-Singleton and to own underlying ↵dmikurube@chromium.org2011-07-271-6/+0
| | | | | | | | | | | | | | | | | FileUtils. Based on the discussion at http://codereview.chromium.org/7174002/diff/26001/webkit/fileapi/local_file_system_file_util.h#newcode38, this change * also reduces dependency between FileUtils, * enables more flexible stacking of -FileUtils, such as QuotaFileUtil over other -FileUtils, and * makes -FileUtils symmetry so owner handling for these objects gets unified. BUG=none TEST=FileSystemFileUtilTest.*,FileSystemOperationTest.*,FileSystemOperationWriteTest.*,FileSystemQuotaTest.*,FileWriterDelegateTest.*,LocalFileSystemFileUtilTest.*,ObfuscatedFileSystemFileUtil.*,QuotaFileUtil.*,SandboxMountPointProviderTest.* Review URL: http://codereview.chromium.org/7312023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94251 0039d316-1c4b-4281-b951-d872f2087c98
* Change quota to account directories and path names in the filesystem.dmikurube@chromium.org2011-07-251-41/+48
| | | | | | | | | BUG=89841 TEST=FileSystemQuotaClientTest.*,FileSystemQuotaTest.*,FileSystemObfuscatedQuotaTest.*,QuotaFileUtilTest.* Review URL: http://codereview.chromium.org/7347003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93881 0039d316-1c4b-4281-b951-d872f2087c98
* Adding FileUtilProxy::Entry::{size,last_modified_time},tzik@chromium.org2011-07-191-0/+3
| | | | | | | | | | | | and FileEnumerator::{GetFilesize,GetLastModifiedTime}. BUG=89134 TEST=None Review URL: http://codereview.chromium.org/7355013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92975 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Handle negative returns.jhawkins@chromium.org2011-06-211-0/+1
| | | | | | | | | | | | CID=16857,16921 BUG=none TEST=none R=thestig@chromium.org Review URL: http://codereview.chromium.org/7218020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89918 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: base/scoped_ptr.h -> base/memory/scoped_ptr.h. (part 2)thestig@chromium.org2011-06-151-3/+5
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7149008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89131 0039d316-1c4b-4281-b951-d872f2087c98
* Disallow links from being seen by the extensions via the fileapi.rkc@chromium.org2011-05-311-1/+11
| | | | | | | | | | | | This change is more of a hack at the moment, ideally we need to refactor file_util (and maybe a bit of file_path) to provide better ways to handle symlinks. This fix prevents exploits reading arbitary files either through handled extension calls or our component extension. BUG=chromium-os:15826 TEST=Verified that links do not show up when reading a directory in the file browser UI. Tests that specifically check for this will follow in subsequent checkins. Review URL: http://codereview.chromium.org/7085005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87389 0039d316-1c4b-4281-b951-d872f2087c98
* Enable cross-filesystem moves and copies.ericu@chromium.org2011-05-261-22/+108
| | | | | | | | | | BUG=none TEST=unit tests included; I also tested locally with a cross-filesystem-sync-copy layout test [that I'll add to webkit later], both with and without obfuscation. Review URL: http://codereview.chromium.org/7066033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86755 0039d316-1c4b-4281-b951-d872f2087c98
* ObfuscatedFileSystemFileUtil classericu@google.com2011-05-131-1/+2
| | | | | | | | | | This is functional and reasonably well-tested, but we'll still have to adapt the system a bit in order to use it. BUG=none TEST=included unit tests Review URL: http://codereview.chromium.org/6955013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85332 0039d316-1c4b-4281-b951-d872f2087c98
* Make FileSystemFileUtil::Copy/Move non-virtual.dmikurube@chromium.org2011-04-281-6/+9
| | | | | | | | | | BUG=none TEST=LocalFileSystemFileUtilTest.* Review URL: http://codereview.chromium.org/6902026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83307 0039d316-1c4b-4281-b951-d872f2087c98
* Update .usage in QuotaFileUtil and FileWriterDelegate.dmikurube@google.com2011-04-261-11/+72
| | | | | | | BUG=74841 TEST=QuotaFileUtilTest.*,FileWriterDelegateTest.*,FileSystemOperationWriteTest.* git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83006 0039d316-1c4b-4281-b951-d872f2087c98
* Modify error code of move/copy preparation.tzik@google.com2011-04-211-2/+2
| | | | | | | | | | | | ref: https://bugs.webkit.org/show_bug.cgi?id=58864 BUG=None TEST=None Review URL: http://codereview.chromium.org/6881078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82446 0039d316-1c4b-4281-b951-d872f2087c98
* Add "allowed growth" for writing operations, such as copy, move, write and ↵dmikurube@chromium.org2011-04-211-12/+19
| | | | | | | | | | | | | truncate. A writing operation which increases the file size more than "allowed growth" results in PLATFORM_FILE_ERROR_NO_SPACE. BUG=74841 TEST=FileWriterDelegateTest.*,QuotaFileUtilTest.*,FileSystemOperationTest.* Review URL: http://codereview.chromium.org/6725021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82441 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed file/directory url resolution for external mount point provider.zelidrag@chromium.org2011-04-201-0/+8
| | | | | | | | | | Per Eric's request, refactored FileSystemDirURLRequestJob and FileSystemURLRequestJob classes to resolve local file system through a new operation. BUG=chromium-os:14225 TEST=added new test cases to FileSystemPathManagerTest.*, added FileSystemOperationTest.TestGetLocalFilePathSuccess Review URL: http://codereview.chromium.org/6864040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82266 0039d316-1c4b-4281-b951-d872f2087c98
* Extract a recursive copy function as a shared and non-virtual function.dmikurube@chromium.org2011-04-131-7/+110
| | | | | | | | | | | | | This extraction is required to stack FileUtil layers without duplicated code of recursive copy. No tests because it doesn't change any behavior. BUG=none TEST=none Review URL: http://codereview.chromium.org/6772005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81388 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the path from PlatformFileInfo; it's cleaner just to pass it along as aericu@google.com2011-03-281-2/+3
| | | | | | | | | | 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
* Stop returning the true root path of each filesystem from openFileSystem.ericu@google.com2011-03-241-0/+1
| | | | | | | | | | | 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
* Virtualize file_util calls from ↵dmikurube@google.com2011-03-081-63/+75
| | | | | | | | | | | | | FileSystemFileUtil::PerformCommonCheckAndPreparationForMoveAndCopy. It refactors the TODO issue at http://codereview.chromium.org/6604020/ . BUG=74841 TEST=none Review URL: http://codereview.chromium.org/6625031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77375 0039d316-1c4b-4281-b951-d872f2087c98
* Revive FileAPI's recursive CreateDirectory.kinuko@chromium.org2011-03-071-4/+8
| | | | | | | | | | | 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-0/+253
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