Skip to content
Snippets Groups Projects
  • kinuko@chromium.org's avatar
    103c8d4b
    Make FileSystemOperation's lifetime more explicit. · 103c8d4b
    kinuko@chromium.org authored
    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
    103c8d4b
    History
    Make FileSystemOperation's lifetime more explicit.
    kinuko@chromium.org authored
    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