summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi
Commit message (Collapse)AuthorAgeFilesLines
* Handle invalid usage cache file pathtzik@chromium.org2012-08-151-5/+5
| | | | | | | | | | | usage_file_path can be empty when a FileSystem is accessed after DeleteFileSystem call. BUG= Review URL: https://chromiumcodereview.appspot.com/10832316 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151692 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up FileSystemQuotaClient.nhiroki@chromium.org2012-08-151-13/+16
| | | | | | | | | BUG=139270 Review URL: https://chromiumcodereview.appspot.com/10830330 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151661 0039d316-1c4b-4281-b951-d872f2087c98
* Add RevokeFileSystem back to IsolatedContextkinuko@chromium.org2012-08-133-13/+57
| | | | | | | | | | | | We deprecated it when we added RevokeFileSystemByPath but it looks we still want it. BUG=none TEST=IsolatedContextTest.RegisterAndRevokeTest Review URL: https://chromiumcodereview.appspot.com/10837217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151256 0039d316-1c4b-4281-b951-d872f2087c98
* Invalid FileSystemURL should not be given to FileUtilskinuko@chromium.org2012-08-132-7/+10
| | | | | | | | | | | | (In usual call path it errors out before it calls into FileUtil) BUG=none TEST=IsolatedFileUtilTest.UnregisteredPathsTest Review URL: https://chromiumcodereview.appspot.com/10825316 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151253 0039d316-1c4b-4281-b951-d872f2087c98
* Remove FileSystemFileUtil::{Directory,Path}Existstzik@chromium.org2012-08-1317-241/+123
| | | | | | | | | | | | They were used in file_util_helper.cc and by tests only, and is not needed to exist separate implementation per FileUtil. Can I remove it like this? BUG= Review URL: https://chromiumcodereview.appspot.com/10855039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151234 0039d316-1c4b-4281-b951-d872f2087c98
* Change the type of file_type parameter to int, as the parameter actually ↵haruki@chromium.org2012-08-126-28/+18
| | | | | | | | | | | | | takes or-ed bitmasks, to remove static_cast<> in the callers. BUG=139130 TEST=try bots Review URL: https://chromiumcodereview.appspot.com/10855002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151192 0039d316-1c4b-4281-b951-d872f2087c98
* Clean-up inline members of nested classes (webkit/)hans@chromium.org2012-08-093-4/+30
| | | | | | | | | | | | | | | | Due to a bug, the Clang-plugin style checker failed to warn about inline constructors, destructors, non-empty virtual methods, etc. for nested classes. The plugin has been fixed, and this patch is part of a clean-up of all the code that now causes the plugin to issue errors. BUG=139346 Review URL: https://chromiumcodereview.appspot.com/10829258 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150912 0039d316-1c4b-4281-b951-d872f2087c98
* Refactors FileSystemQuotaClient using base::Callback.nhiroki@chromium.org2012-08-072-230/+93
| | | | | | | | | BUG=139270 Review URL: https://chromiumcodereview.appspot.com/10828177 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150290 0039d316-1c4b-4281-b951-d872f2087c98
* Move {Native,Device}MediaFileUtil from FILE thread to SequencedWorkerPool to ↵tzik@chromium.org2012-08-0723-95/+217
| | | | | | | | | | avoid it blocks other I/O. BUG=139187 Review URL: https://chromiumcodereview.appspot.com/10829147 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150252 0039d316-1c4b-4281-b951-d872f2087c98
* Add path filtering to DeviceMediaFileUtiltzik@chromium.org2012-08-075-53/+123
| | | | | | | | BUG=137670 Review URL: https://chromiumcodereview.appspot.com/10823171 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150183 0039d316-1c4b-4281-b951-d872f2087c98
* Create ShareableFileReference on IO threadkinuko@chromium.org2012-08-0412-85/+120
| | | | | | | | | | | | * ShareableFileReference is not thread-safe, we should make sure we only handle it on IO thread * FileUtil implementation no longer needs to directly handle ShareableFileReference BUG=140508 Review URL: https://chromiumcodereview.appspot.com/10834167 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149992 0039d316-1c4b-4281-b951-d872f2087c98
* Fix two unchecked return valuestbreisacher@chromium.org2012-08-031-3/+9
| | | | | | | | | | CID=104234,104664 BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10824031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149970 0039d316-1c4b-4281-b951-d872f2087c98
* Remove ScopedAllowIO from MediaPathFiltertzik@chromium.org2012-08-032-14/+28
| | | | | | | | | BUG=140401 Review URL: https://chromiumcodereview.appspot.com/10827157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149948 0039d316-1c4b-4281-b951-d872f2087c98
* Isolated FS for Media devices.kmadhusu@chromium.org2012-08-0314-7/+788
| | | | | | | | | | | | Implemented a skeleton code to handle media file systems. BUG=140332 TEST=none Review URL: https://chromiumcodereview.appspot.com/10781014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149807 0039d316-1c4b-4281-b951-d872f2087c98
* Temporary allow IO for GetMimeTypeFromExtensions in MediaPathFilter.tzik@chromium.org2012-08-031-0/+5
| | | | | | | | BUG=140401 Review URL: https://chromiumcodereview.appspot.com/10824160 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149772 0039d316-1c4b-4281-b951-d872f2087c98
* Adding RevokeFileSystemByPathkinuko@chromium.org2012-08-024-42/+140
| | | | | | | | | | | so that we can make sure we invalidate all file systems associated to a given path (e.g. for a detached device) BUG=none TEST=IsolatedContextTest.* Review URL: https://chromiumcodereview.appspot.com/10829136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149732 0039d316-1c4b-4281-b951-d872f2087c98
* Wire up the deleteFileSystem operation.nhiroki@google.com2012-08-0210-55/+134
| | | | | | | | | BUG=139366 TEST="Will be tested from WebKit inspector test" Review URL: https://chromiumcodereview.appspot.com/10828043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149707 0039d316-1c4b-4281-b951-d872f2087c98
* Implement media path filtertzik@chromium.org2012-08-0214-22/+619
| | | | | | | | | | BUG=137670 TEST='NativeMediaFileUtilTest.*' Review URL: https://chromiumcodereview.appspot.com/10825042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149566 0039d316-1c4b-4281-b951-d872f2087c98
* Outsource FileSystemOperationContext from LocalFileSystemOperationtzik@chromium.org2012-07-266-29/+38
| | | | | | | | | | BUG=None TEST=existing test Review URL: https://chromiumcodereview.appspot.com/10834021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148512 0039d316-1c4b-4281-b951-d872f2087c98
* Enables internal filesystem types via Isolated filesystems.kinuko@chromium.org2012-07-2523-393/+159
| | | | | | | | | | | | | | * cracks isolated path in FileSystemURL ctor * FileUtils no longer need to crack the isolated path by themselves * Make IsolatedFileUtil inherit from LocalFileUtil * Have a separate FileUtil for DraggedFileUtil, which inherits from IsolatedFileUtil BUG=134078,138022 TEST=existing tests Review URL: https://chromiumcodereview.appspot.com/10810053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148440 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize member variables.jhawkins@chromium.org2012-07-251-1/+2
| | | | | | | | | | | | | | CID_COUNT=12 CID=104349,104361,104373,104374,104399,104420,104421,104422,104466,104476, 104532,104538 BUG=none TEST=none R=groby TBR=brettw,satorux,mnissler Review URL: https://chromiumcodereview.appspot.com/10833006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148430 0039d316-1c4b-4281-b951-d872f2087c98
* Add more FS types and introduce type field into IsolatedContextkinuko@chromium.org2012-07-2510-113/+210
| | | | | | | | | | | (Separated from a bigger patch: https://chromiumcodereview.appspot.com/10810053) BUG=138022 TEST=existing tests Review URL: https://chromiumcodereview.appspot.com/10817006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148291 0039d316-1c4b-4281-b951-d872f2087c98
* Factor out common error-code conversion code for PlatformFileErrorToNetError.nhiroki@google.com2012-07-252-8/+2
| | | | | | | | | BUG=136494 Review URL: https://chromiumcodereview.appspot.com/10808043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148255 0039d316-1c4b-4281-b951-d872f2087c98
* Renamed FileSystemOperation to LocalFileSystemOperation.nhiroki@google.com2012-07-2420-288/+308
| | | | | | | | | | BUG=138020 TEST=content_unittests Review URL: https://chromiumcodereview.appspot.com/10790096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148178 0039d316-1c4b-4281-b951-d872f2087c98
* Adding FileUtil::CreateSnapshotFilekinuko@chromium.org2012-07-1912-47/+170
| | | | | | | | | | BUG=138029 TEST=existing tests Review URL: https://chromiumcodereview.appspot.com/10815003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147425 0039d316-1c4b-4281-b951-d872f2087c98
* Restore modified timestamps of moved directories.nhiroki@google.com2012-07-181-9/+40
| | | | | | | | | | BUG=136490 TEST=content_unittests Review URL: https://chromiumcodereview.appspot.com/10701168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147209 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-119-9/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Don't keep file system directories around if they contain unrelated files.bauerb@chromium.org2012-07-113-56/+79
| | | | | | | | | | | | | | | | Finder on Mac OS has a habit of putting .DS_Store files into directories, which would (silently) prevent us from deleting them. Also, don't treat trying to delete a directory that doesn't exist on disk anymore as an error. Add URL to quota managed origin deletion callback. BUG=134825 TEST=Clear Browsing Data does that. Review URL: https://chromiumcodereview.appspot.com/10701094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146089 0039d316-1c4b-4281-b951-d872f2087c98
* Make isolated file system works for a device root (e.g. X:\\)kinuko@chromium.org2012-07-106-160/+278
| | | | | | | | | | | | | * directory drag-and-drop should work for a USB drive etc * Media device intent should work on Windows BUG=134828,135010 TEST=manually tested TEST=IsolatedContext\* Review URL: https://chromiumcodereview.appspot.com/10713007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145862 0039d316-1c4b-4281-b951-d872f2087c98
* Notify CloseFile from Pepper to FileSystem.kinaba@chromium.org2012-07-103-0/+15
| | | | | | | | | | | | | | | | | Remote filesystems need to know when a plugin finished updating a local cache file in order to commit the change. This CL is to wire the notification of file close between the two components. Since writable OpenFile is not yet implemented for remote filesystem, the CL itself should not cause behavior change. BUG=132236 TEST=browser_tests --gtest_filter='*FileIO*' Review URL: https://chromiumcodereview.appspot.com/10541113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145856 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ObfuscatedOriginEnumerator::Next not to try to callericu@chromium.org2012-07-091-6/+8
| | | | | | | | | | | | | GetOriginURLFromIdentifier if it doesn't have an identifier. BUG=133402 TEST=ObfuscatedFileUtilTest.TestCreateAndDeleteFile on Linux debug Review URL: https://chromiumcodereview.appspot.com/10572006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145766 0039d316-1c4b-4281-b951-d872f2087c98
* Remove ugly writable flags from IsolatedContextkinuko@chromium.org2012-06-307-100/+6
| | | | | | | | | | | | | | For regular chrome centralize the read/write permission to ChildProcessSecurityPolicy and do nothing in fileapi layer. For DRT/content_shell disable writes at SimpleFileSystem layer as well as we do in FileAPIMessageFilter for chrome. BUG=none TEST=existing tests TEST=layout tests https://bugs.webkit.org/show_bug.cgi?id=89981 Review URL: https://chromiumcodereview.appspot.com/10692005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145063 0039d316-1c4b-4281-b951-d872f2087c98
* Decouple URLRequestJob from URLRequestContext; access NetworkDelegate as a ↵shalev@chromium.org2012-06-293-3/+5
| | | | | | | | | | | | | | contructor parameter. Note: this depends on http://codereview.chromium.org/10559036/ BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/10534100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144948 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused fields found by clang's new Wunused-private-fields.thakis@chromium.org2012-06-272-2/+0
| | | | | | | | | | | | Test file edition. BUG=none TEST=none TBR=remaining owners Review URL: https://chromiumcodereview.appspot.com/10680013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144464 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce the number of CrackFileSystemURLkinuko@chromium.org2012-06-2752-1301/+1239
| | | | | | | | | | | | | | | | | - crack the filesystem URL as soon as we get it in FileAPIMessageFilter - introduce a new class FileSystemURL for cracked URL information and use it everywhere - deprecate FileSystemPath (this used to serve the similar role for *FileUtil classes) Mechanical changes only except for fileapi_message_filter.cc and file_system_operation.cc. This change reduces the # of CrackFileSystemURL roughly from 3~4 to 1 for each FileSystem operation. BUG=none TEST=existing tests Review URL: https://chromiumcodereview.appspot.com/10566002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144368 0039d316-1c4b-4281-b951-d872f2087c98
* Relanding r144115: Manage Isolated Context with reference counts w/o DCHECKkinuko@chromium.org2012-06-262-8/+57
| | | | | | | | | | | Removed DCHECK for IsAbsolute() check since it doesn't seem practical to enforce it for all the testing. BUG=none TEST=existing tests should pass Review URL: https://chromiumcodereview.appspot.com/10656042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144172 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 144115 - Manage IsolatedContext with reference countskinuko@chromium.org2012-06-262-51/+7
| | | | | | | | | | | | | | | | to make it possible to be shared by multiple children. This patch itself should have no side effect. BUG=none TEST=existing tests should pass Review URL: https://chromiumcodereview.appspot.com/10536200 TBR=kinuko@chromium.org Review URL: https://chromiumcodereview.appspot.com/10658029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144133 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 144126 - Comment fix for r144115 (Manage IsolatedContext with ↵kinuko@chromium.org2012-06-261-2/+3
| | | | | | | | | | | | | | | reference counts) BUG=none TEST=none TBR=tzik Review URL: https://chromiumcodereview.appspot.com/10656039 TBR=kinuko@chromium.org Review URL: https://chromiumcodereview.appspot.com/10656041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144132 0039d316-1c4b-4281-b951-d872f2087c98
* Comment fix for r144115 (Manage IsolatedContext with reference counts)kinuko@chromium.org2012-06-261-3/+2
| | | | | | | | | | BUG=none TEST=none TBR=tzik Review URL: https://chromiumcodereview.appspot.com/10656039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144126 0039d316-1c4b-4281-b951-d872f2087c98
* Manage IsolatedContext with reference countskinuko@chromium.org2012-06-262-7/+51
| | | | | | | | | | | | | to make it possible to be shared by multiple children. This patch itself should have no side effect. BUG=none TEST=existing tests should pass Review URL: https://chromiumcodereview.appspot.com/10536200 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144115 0039d316-1c4b-4281-b951-d872f2087c98
* Adding truncate and touch for isolated filesystemkinuko@chromium.org2012-06-253-2/+108
| | | | | | | | | BUG=134039,134078 TEST=IsolatedFileUtilTest.* Review URL: https://chromiumcodereview.appspot.com/10447139 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143868 0039d316-1c4b-4281-b951-d872f2087c98
* Added URLRequestContext to constructor for URLRequest.erikwright@chromium.org2012-06-224-7/+20
| | | | | | | | | | | | | Previously, the context was set using the member function set_context. Note that the context for a URLRequest is not allowed to be null. BUG=81979 TEST=None TBR=ajwong,brettw,vitalybuka,sky Review URL: https://chromiumcodereview.appspot.com/10559036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143595 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some errors when building in gcc 4.6dcheng@chromium.org2012-06-191-6/+1
| | | | | | | | | | BUG=none TEST=compiles Review URL: https://chromiumcodereview.appspot.com/10559011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143046 0039d316-1c4b-4281-b951-d872f2087c98
* Fix symbolic link handling in fileapikinuko@chromium.org2012-06-196-34/+18
| | | | | | | | | | | | | | | | | | | In isolated file system: - disallows following symlinks in a directory / subdirectories - do not list symlinks in a directory / subdirectories - allows symlink access if the symlink file itself is selected (i.e. it's a top-level entry) In any other sandboxed file systems: - disallow symlink access at all (not only in ReadDirectory) Removes AbstractFileEnumerator::IsLink. BUG=none TEST=manually tested for isolated files (if a symlink file is dropped it should be viewable, but if a directory is dropped which contains symlinks those symlinks should not be listed/viewable). Review URL: https://chromiumcodereview.appspot.com/10557035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142899 0039d316-1c4b-4281-b951-d872f2087c98
* Allow extension fileSystem API to work with drag and drop entries.benwells@chromium.org2012-06-182-1/+9
| | | | | | | | | | BUG=133067 TEST=Manual testing Review URL: https://chromiumcodereview.appspot.com/10561024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142672 0039d316-1c4b-4281-b951-d872f2087c98
* Move MountPointProvider:GetRootDirectories() out of MPP and into ↵kinuko@chromium.org2012-06-177-26/+4
| | | | | | | | | | | ExternalMountPointProvider. BUG=none TEST=existing tests Review URL: https://chromiumcodereview.appspot.com/10540177 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142632 0039d316-1c4b-4281-b951-d872f2087c98
* Write() operation for GData file system.kinaba@chromium.org2012-06-131-0/+2
| | | | | | | | | BUG=127097 TEST=unit_tests --gtest_filter='*GData*' Review URL: https://chromiumcodereview.appspot.com/10477026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141869 0039d316-1c4b-4281-b951-d872f2087c98
* Retry: Make Isolated file system writable only if it is configured sokinuko@chromium.org2012-06-128-34/+103
| | | | | | | | | | | | | | - CreateFileStreamWriter wiring in FSO - Add yet another write-protection at IsolatedContext (in addition to ChildProcessSecurityPolicy, so that we can make each fs read-only or writable in DRT/testing) BUG=none TEST=existing tests should pass Original review URL: https://chromiumcodereview.appspot.com/10540070 Review URL: https://chromiumcodereview.appspot.com/10532085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141650 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 141395 - Make Isolated file system writable only if it is configured sokinuko@chromium.org2012-06-118-103/+34
| | | | | | | | | | | | | | | - Use CreateFileStreamWriter in FSO - Add yet another write-protection at IsolatedContext (in addition to ChildProcessSecurityPolicy, so that we can make each fs read-only or writable in DRT/testing) BUG=none TEST=none (will add layout_test) Review URL: https://chromiumcodereview.appspot.com/10540070 TBR=kinuko@chromium.org Review URL: https://chromiumcodereview.appspot.com/10534088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141398 0039d316-1c4b-4281-b951-d872f2087c98
* Make Isolated file system writable only if it is configured sokinuko@chromium.org2012-06-118-34/+103
| | | | | | | | | | | | - Use CreateFileStreamWriter in FSO - Add yet another write-protection at IsolatedContext (in addition to ChildProcessSecurityPolicy, so that we can make each fs read-only or writable in DRT/testing) BUG=none TEST=none (will add layout_test) Review URL: https://chromiumcodereview.appspot.com/10540070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141395 0039d316-1c4b-4281-b951-d872f2087c98