summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_writer_delegate.h
Commit message (Collapse)AuthorAgeFilesLines
* Reduce the number of CrackFileSystemURLkinuko@chromium.org2012-06-271-1/+0
| | | | | | | | | | | | | | | | | - 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
* Rename fileapi::FileWriter to FileStreamWriter.kinaba@chromium.org2012-05-311-3/+3
| | | | | | | | | | | | | | For several reasons the name of the class was confusing: - It does not directly correspond to FileWriter in File API (which is implemented by WebCore::FileWriter), and - FileWriterDelegate is NOT a delegate of the class. hence the change. FileReader renaming is to come in a separate CL. BUG=128483 TEST=unit_tests --gtest_filter='*File*Write*' Review URL: https://chromiumcodereview.appspot.com/10456024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139738 0039d316-1c4b-4281-b951-d872f2087c98
* Move fileapi into its own componentbenwells@chromium.org2012-05-301-1/+3
| | | | | | | | | | | | Before this change fileapi is a static library. As it has static data, this causes problems when used from multiple components like chrome and content. BUG=129885 TEST=Existing tests Review URL: https://chromiumcodereview.appspot.com/10447055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139498 0039d316-1c4b-4281-b951-d872f2087c98
* Implement SandboxFileWriter and rewrite FileWriterDelegate to use itkinuko@chromium.org2012-05-221-18/+8
| | | | | | | | | BUG=127529 TEST=FileWriterDelegate*, FileSystemOperationWrite* Review URL: https://chromiumcodereview.appspot.com/10387054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138236 0039d316-1c4b-4281-b951-d872f2087c98
* FileWriterDelegate should not call URLRequest::Start() after Cancel().kinuko@chromium.org2012-05-111-6/+13
| | | | | | | | | | | | - This should also fix one of the flaky crashes in FileWriterDelegate::OnDataWritten after cancel - This patch also removes Start/End quota update from FileWriterDelegate since now we do that in FileSystemOperation BUG=122160,116639 TEST=file-writer-abort-continue.html Review URL: https://chromiumcodereview.appspot.com/10008047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136513 0039d316-1c4b-4281-b951-d872f2087c98
* Change webkit/{fileapi,quota} code to use TaskRunner.kinuko@chromium.org2012-05-071-4/+1
| | | | | | | | | BUG=123559 TEST=existing tests Review URL: https://chromiumcodereview.appspot.com/10197007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135616 0039d316-1c4b-4281-b951-d872f2087c98
* Move src/dest info out of FileSystemOperationContextkinuko@chromium.org2012-02-261-0/+3
| | | | | | | | | | | | | | | | | 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
* net: FileStream::Read/Write() to take IOBuffer* instead of char*satorux@chromium.org2012-02-161-1/+2
| | | | | | | | | | | | This will make it easier to use these functions. BUG=72001 TEST=try bots Review URL: http://codereview.chromium.org/9402014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122267 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 118001 - Revert 117968 - Rename is_hsts_host to fatal.apatrick@chromium.org2012-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per wtc: the old name was too specific, and became confusing because we now also have certificate errors that users cannot override, but for reasons other than (although still closely related to) HSTS. Failures were: http://chromegw.corp.google.com/i/chromium/builders/XP%20Tests%20%28dbg%29%286%29/builds/7935 http://chromegw.corp.google.com/i/chromium/builders/XP%20Tests%20%28dbg%29%282%29/builds/13488 (view as text) WorkerFileSystemTest.FileWriterSyncTruncateExtend: [1132:3724:0117/155729:2434562:INFO:ui_layout_test.cc(57)] Assume LayoutTests in E:\b\build\slave\XP_Tests__dbg__6_\build\src\chrome\test\data\layout_tests\LayoutTests [1132:3724:0117/155729:2434562:INFO:ui_layout_test.cc(143)] Assume LayoutTests in fast\filesystem [1132:3724:0117/155730:2434765:INFO:ui_layout_test.cc(143)] Assume LayoutTests in fast\js .\test\ui\ui_test.cc(720): error: Failed Timeout reached in WaitUntilCookieNonEmpty Google Test trace: .\test\ui\ui_layout_test.cc(174): file-writer-sync-truncate-extend.html .\test\ui\ui_layout_test.cc(254): error: Value of: inner_text.c_str() Actual: "[Worker] Test using FileWriterSync.truncate to extend a file. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". Starting worker: ../resources/file-writer-sync-truncate-extend.js " Expected: expected_result_value.c_str() Which is: "[Worker] Test using FileWriterSync.truncate to extend a file. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". Starting worker: ../resources/file-writer-sync-truncate-extend.js PASS [Worker] Truncate extension verified. PASS successfullyParsed is true TEST COMPLETE " Google Test trace: .\test\ui\ui_layout_test.cc(174): file-writer-sync-truncate-extend.html BUG=109941 Review URL: https://chromiumcodereview.appspot.com/9188019 TBR=palmer@chromium.org TBR=apatrick@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118011 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 117968 - Rename is_hsts_host to fatal.apatrick@chromium.org2012-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per wtc: the old name was too specific, and became confusing because we now also have certificate errors that users cannot override, but for reasons other than (although still closely related to) HSTS. Failures were: http://chromegw.corp.google.com/i/chromium/builders/XP%20Tests%20%28dbg%29%286%29/builds/7935 http://chromegw.corp.google.com/i/chromium/builders/XP%20Tests%20%28dbg%29%282%29/builds/13488 (view as text) WorkerFileSystemTest.FileWriterSyncTruncateExtend: [1132:3724:0117/155729:2434562:INFO:ui_layout_test.cc(57)] Assume LayoutTests in E:\b\build\slave\XP_Tests__dbg__6_\build\src\chrome\test\data\layout_tests\LayoutTests [1132:3724:0117/155729:2434562:INFO:ui_layout_test.cc(143)] Assume LayoutTests in fast\filesystem [1132:3724:0117/155730:2434765:INFO:ui_layout_test.cc(143)] Assume LayoutTests in fast\js .\test\ui\ui_test.cc(720): error: Failed Timeout reached in WaitUntilCookieNonEmpty Google Test trace: .\test\ui\ui_layout_test.cc(174): file-writer-sync-truncate-extend.html .\test\ui\ui_layout_test.cc(254): error: Value of: inner_text.c_str() Actual: "[Worker] Test using FileWriterSync.truncate to extend a file. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". Starting worker: ../resources/file-writer-sync-truncate-extend.js " Expected: expected_result_value.c_str() Which is: "[Worker] Test using FileWriterSync.truncate to extend a file. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". Starting worker: ../resources/file-writer-sync-truncate-extend.js PASS [Worker] Truncate extension verified. PASS successfullyParsed is true TEST COMPLETE " Google Test trace: .\test\ui\ui_layout_test.cc(174): file-writer-sync-truncate-extend.html BUG=109941 Review URL: https://chromiumcodereview.appspot.com/9188019 TBR=palmer@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118001 0039d316-1c4b-4281-b951-d872f2087c98
* Rename is_hsts_host to fatal.palmer@chromium.org2012-01-171-1/+1
| | | | | | | | | | | Per wtc: the old name was too specific, and became confusing because we now also have certificate errors that users cannot override, but for reasons other than (although still closely related to) HSTS. BUG=109941 Review URL: https://chromiumcodereview.appspot.com/9188019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117968 0039d316-1c4b-4281-b951-d872f2087c98
* Remove task.h and finish base::Bind() migration.ajwong@chromium.org2012-01-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over 341 CLs, in ~3 months, touching 3251 unique files! Top 5 most CLs: (121) jhawkins ( 45) dcheng ( 24) achuith ( 23) csilv ( 12) tfarina ( 12) groby ~1000 files touched: (918) jhawkins 100+ files touched: (486) ajwong (385) willchan (372) dcheng (126) csilv (123) fischman (112) sergeyu 49+ files touched: (65) tfarina (57) acolwell (52) adamk (49) tzik BUG=35223 TEST=existing Review URL: http://codereview.chromium.org/9114020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116748 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Final cleanup in webkit/fileapi.jhawkins@chromium.org2011-10-201-4/+2
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8353023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106600 0039d316-1c4b-4281-b951-d872f2087c98
* Switch FileStream to use new CompletionCallback.willchan@chromium.org2011-10-121-2/+0
| | | | | | | | | | BUG=98719 TEST=none Review URL: http://codereview.chromium.org/8139019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105042 0039d316-1c4b-4281-b951-d872f2087c98
* Begin CompletionCallback switchover.willchan@chromium.org2011-10-011-1/+1
| | | | | | | | | | | | | Rename CompletionCallback to OldCompletionCallback in preparation for introducing a new CompletionCallback based on base::Callback. Also renames other CompletionCallback types like CancelableCompletionCallback and TestCompletionCallback and CompletionCallbackImpl. All using sed with s/CompletionCallback/OldCompletionCallback/g. BUG=98719 TEST=none Review URL: http://codereview.chromium.org/8070013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103650 0039d316-1c4b-4281-b951-d872f2087c98
* net: make HSTS hosts use the normal SSL interstitialsagl@chromium.org2011-09-271-9/+13
| | | | | | | | | | | | | | | | | | | | | | | (Reland of r102947, which was reverted in r102950.) SSL interstitials have better translations for the error messages and this returns us to the point where we have only a single UI for SSL errors, which will make some future changes easier. First, this change changes the SSL error callbacks to take an SSLInfo& rather than a X509Certificate* (which was already a TODO(wtc) in the code). Most of this change is the resulting plumbing. It also adds a |is_hsts_host| flag to the callbacks to denote an HSTS host. Finally, in ssl_policy.cc the |is_hsts_host| flag causes any error to be fatal. BUG=93527 http://codereview.chromium.org/7976036/ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102994 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "net: make HSTS hosts use the normal SSL interstitials"agl@chromium.org2011-09-271-13/+9
| | | | | | | This reverts commit r102947. It broke the shared build, probably because of a missing NET_EXPORT. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102950 0039d316-1c4b-4281-b951-d872f2087c98
* net: make HSTS hosts use the normal SSL interstitialsagl@chromium.org2011-09-271-9/+13
| | | | | | | | | | | | | | | | | | | | | SSL interstitials have better translations for the error messages and this returns us to the point where we have only a single UI for SSL errors, which will make some future changes easier. First, this change changes the SSL error callbacks to take an SSLInfo& rather than a X509Certificate* (which was already a TODO(wtc) in the code). Most of this change is the resulting plumbing. It also adds a |is_hsts_host| flag to the callbacks to denote an HSTS host. Finally, in ssl_policy.cc the |is_hsts_host| flag causes any error to be fatal. BUG=93527 http://codereview.chromium.org/7976036/ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102947 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmitting 86978 - Fix FileWriterDelegate's usage tracking behaviorkinuko@chromium.org2011-05-271-3/+2
| | | | | | | | | | | Resolved merge conflicts that had caused breakage in the previous attempt. Review URL: http://codereview.chromium.org/7067021 BUG=74841 TEST=FileWriterDelegateTest.*, QuotaFileUtilTest.* TBR=ericu, msw git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86988 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 86978 - Fix FileWriterDelegate's usage tracking behaviorkinuko@chromium.org2011-05-271-2/+3
| | | | | | | | | | | | | | | | - allowed_growth can be negative if the current usage is larger than the quota; in that case we shouldn't crash (there was a DCHECK that is checking it) - fixed 'delta' size in update notification for overwriting cases - now it respects 'unlimitedStorage' settings BUG=74841 TEST=FileWriterDelegate.WriteWithQuotaAndOffset Review URL: http://codereview.chromium.org/7067021 TBR=kinuko@chromium.org Review URL: http://codereview.chromium.org/6962037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86981 0039d316-1c4b-4281-b951-d872f2087c98
* Fix FileWriterDelegate's usage tracking behaviorkinuko@chromium.org2011-05-271-3/+2
| | | | | | | | | | | | | - allowed_growth can be negative if the current usage is larger than the quota; in that case we shouldn't crash (there was a DCHECK that is checking it) - fixed 'delta' size in update notification for overwriting cases - now it respects 'unlimitedStorage' settings BUG=74841 TEST=FileWriterDelegate.WriteWithQuotaAndOffset Review URL: http://codereview.chromium.org/7067021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86978 0039d316-1c4b-4281-b951-d872f2087c98
* Switch usage cache code to use FileSystemQuotaUtil in FileWriterDelegatekinuko@chromium.org2011-05-171-6/+7
| | | | | | | | | | | patch based on: http://codereview.chromium.org/6973005/ BUG=74841 TEST=FileWriterDelegate.* Review URL: http://codereview.chromium.org/7012037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85622 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r84649 and r84671: "Move MockQuotaManager out of anonymous namespace tompcomplete@chromium.org2011-05-091-1/+1
| | | | | | | | | | | fix build" and "Notify the quota manager when write operation is made in FileSystem API." FileSystemExtensionApiTest.FileBrowserTest is consistently crashing on chrome OS. TBR=kinuko git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84699 0039d316-1c4b-4281-b951-d872f2087c98
* Notify the quota manager when write operation is made in FileSystem API.kinuko@chromium.org2011-05-091-1/+1
| | | | | | | | | | BUG=74841 TEST=QuotaFileUtilTest.* Review URL: http://codereview.chromium.org/6903067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84649 0039d316-1c4b-4281-b951-d872f2087c98
* Update .usage in QuotaFileUtil and FileWriterDelegate.dmikurube@google.com2011-04-261-5/+11
| | | | | | | BUG=74841 TEST=QuotaFileUtilTest.*,FileWriterDelegateTest.*,FileSystemOperationWriteTest.* git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83006 0039d316-1c4b-4281-b951-d872f2087c98
* Add "allowed growth" for writing operations, such as copy, move, write and ↵dmikurube@chromium.org2011-04-211-4/+15
| | | | | | | | | | | | | 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
* Move some files from base to base/memory.levin@chromium.org2011-03-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix memory leak in FileWriterDelegate by passing FileStream::Write a ↵adamk@chromium.org2011-03-151-3/+2
| | | | | | | | | | | | | | callback owned by the delegate. Remove the suppression of this memory leak. R=ericu@chromium.org BUG=75741 TEST=none Review URL: http://codereview.chromium.org/6685056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78148 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequest URLRequest;tfarina@chromium.org2010-11-301-9/+9
| | | | | | | | | 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
* Resubmit of http://codereview.chromium.org/3476002/show but without the ↵ericu@google.com2010-10-071-0/+71
| | | | | | | | | | 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-71/+0
| | | | | | | | | | | | 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-0/+71
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