Index: webkit/tools/test_shell/simple_file_system.cc |
diff --git a/webkit/tools/test_shell/simple_file_system.cc b/webkit/tools/test_shell/simple_file_system.cc |
index 8bf5721cc7f625e6e5ebf6151fe1c5b9d1d525ea..1c1a5c0f47149cf2c823da62d36e4f1f75b3081e 100644 |
--- a/webkit/tools/test_shell/simple_file_system.cc |
+++ b/webkit/tools/test_shell/simple_file_system.cc |
@@ -54,17 +54,11 @@ class SimpleFileSystemCallbackDispatcher |
} |
~SimpleFileSystemCallbackDispatcher() { |
- DCHECK(!operation_.get()); |
- } |
- |
- void set_operation(SandboxedFileSystemOperation* operation) { |
- operation_.reset(operation); |
} |
virtual void DidSucceed() { |
if (file_system_) |
callbacks_->didSucceed(); |
- RemoveOperation(); |
} |
virtual void DidReadMetadata(const base::PlatformFileInfo& info) { |
@@ -76,7 +70,6 @@ class SimpleFileSystemCallbackDispatcher |
WebFileInfo::TypeDirectory : WebFileInfo::TypeFile; |
callbacks_->didReadMetadata(web_file_info); |
} |
- RemoveOperation(); |
} |
virtual void DidReadDirectory( |
@@ -95,7 +88,6 @@ class SimpleFileSystemCallbackDispatcher |
web_entries_vector; |
callbacks_->didReadDirectory(web_entries, has_more); |
} |
- RemoveOperation(); |
} |
virtual void DidOpenFileSystem( |
@@ -107,14 +99,12 @@ class SimpleFileSystemCallbackDispatcher |
callbacks_->didOpenFileSystem( |
UTF8ToUTF16(name), webkit_glue::FilePathToWebString(path)); |
} |
- RemoveOperation(); |
} |
virtual void DidFail(base::PlatformFileError error_code) { |
if (file_system_) |
callbacks_->didFail( |
webkit_glue::PlatformFileErrorToWebFileError(error_code)); |
- RemoveOperation(); |
} |
virtual void DidWrite(int64, bool) { |
@@ -122,17 +112,8 @@ class SimpleFileSystemCallbackDispatcher |
} |
private: |
- void RemoveOperation() { |
- // We need to make sure operation_ is null when we delete the operation |
- // (which in turn deletes this dispatcher instance). |
- scoped_ptr<SandboxedFileSystemOperation> operation; |
- operation.swap(operation_); |
- operation.reset(); |
- } |
- |
WeakPtr<SimpleFileSystem> file_system_; |
WebFileSystemCallbacks* callbacks_; |
- scoped_ptr<SandboxedFileSystemOperation> operation_; |
}; |
} // namespace |
@@ -265,6 +246,5 @@ SandboxedFileSystemOperation* SimpleFileSystem::GetNewOperation( |
SandboxedFileSystemOperation* operation = new SandboxedFileSystemOperation( |
dispatcher, base::MessageLoopProxy::CreateForCurrentThread(), |
sandboxed_context_.get()); |
- dispatcher->set_operation(operation); |
return operation; |
} |