Make FileSystemOperation's lifetime more explicit.
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
Showing
- chrome/browser/file_system/browser_file_system_callback_dispatcher.cc 0 additions, 60 deletions...er/file_system/browser_file_system_callback_dispatcher.cc
- chrome/browser/file_system/browser_file_system_callback_dispatcher.h 0 additions, 35 deletions...ser/file_system/browser_file_system_callback_dispatcher.h
- chrome/browser/file_system/file_system_dispatcher_host.cc 54 additions, 2 deletionschrome/browser/file_system/file_system_dispatcher_host.cc
- chrome/browser/file_system/file_system_dispatcher_host.h 2 additions, 3 deletionschrome/browser/file_system/file_system_dispatcher_host.h
- chrome/chrome_browser.gypi 0 additions, 2 deletionschrome/chrome_browser.gypi
- webkit/fileapi/file_system_operation.cc 22 additions, 12 deletionswebkit/fileapi/file_system_operation.cc
- webkit/fileapi/file_system_operation.h 10 additions, 6 deletionswebkit/fileapi/file_system_operation.h
- webkit/fileapi/file_system_operation_unittest.cc 107 additions, 167 deletionswebkit/fileapi/file_system_operation_unittest.cc
- webkit/fileapi/sandboxed_file_system_operation.cc 37 additions, 12 deletionswebkit/fileapi/sandboxed_file_system_operation.cc
- webkit/fileapi/sandboxed_file_system_operation.h 4 additions, 0 deletionswebkit/fileapi/sandboxed_file_system_operation.h
- webkit/tools/test_shell/simple_file_system.cc 2 additions, 22 deletionswebkit/tools/test_shell/simple_file_system.cc
- webkit/tools/test_shell/simple_file_writer.cc 18 additions, 14 deletionswebkit/tools/test_shell/simple_file_writer.cc
This diff is collapsed.
Please register or sign in to comment