| Index: webkit/fileapi/file_system_context.cc
|
| diff --git a/webkit/fileapi/file_system_context.cc b/webkit/fileapi/file_system_context.cc
|
| index 2a806c03419d9eb569cce2dc0aa9623b318b6d2c..2bee4f307fa36286b92dacfbbd1c2012c04ebcad 100644
|
| --- a/webkit/fileapi/file_system_context.cc
|
| +++ b/webkit/fileapi/file_system_context.cc
|
| @@ -8,7 +8,6 @@
|
| #include "base/file_util.h"
|
| #include "base/message_loop_proxy.h"
|
| #include "googleurl/src/gurl.h"
|
| -#include "webkit/fileapi/file_system_callback_dispatcher.h"
|
| #include "webkit/fileapi/file_system_file_util.h"
|
| #include "webkit/fileapi/file_system_operation_interface.h"
|
| #include "webkit/fileapi/file_system_options.h"
|
| @@ -35,15 +34,11 @@ QuotaClient* CreateQuotaClient(
|
| return new FileSystemQuotaClient(file_message_loop, context, is_incognito);
|
| }
|
|
|
| -void DidOpenFileSystem(scoped_ptr<FileSystemCallbackDispatcher> dispatcher,
|
| +void DidOpenFileSystem(FileSystemContext::OpenFileSystemCallback callback,
|
| const GURL& filesystem_root,
|
| const std::string& filesystem_name,
|
| base::PlatformFileError error) {
|
| - if (error == base::PLATFORM_FILE_OK) {
|
| - dispatcher->DidOpenFileSystem(filesystem_name, filesystem_root);
|
| - } else {
|
| - dispatcher->DidFail(error);
|
| - }
|
| + callback.Run(error, filesystem_name, filesystem_root);
|
| }
|
|
|
| } // anonymous namespace
|
| @@ -157,13 +152,13 @@ void FileSystemContext::OpenFileSystem(
|
| const GURL& origin_url,
|
| FileSystemType type,
|
| bool create,
|
| - scoped_ptr<FileSystemCallbackDispatcher> dispatcher) {
|
| - DCHECK(dispatcher.get());
|
| + OpenFileSystemCallback callback) {
|
| + DCHECK(!callback.is_null());
|
|
|
| FileSystemMountPointProvider* mount_point_provider =
|
| GetMountPointProvider(type);
|
| if (!mount_point_provider) {
|
| - dispatcher->DidFail(base::PLATFORM_FILE_ERROR_SECURITY);
|
| + callback.Run(base::PLATFORM_FILE_ERROR_SECURITY, std::string(), GURL());
|
| return;
|
| }
|
|
|
| @@ -172,13 +167,11 @@ void FileSystemContext::OpenFileSystem(
|
|
|
| mount_point_provider->ValidateFileSystemRoot(
|
| origin_url, type, create,
|
| - base::Bind(&DidOpenFileSystem,
|
| - base::Passed(&dispatcher), root_url, name));
|
| + base::Bind(&DidOpenFileSystem, callback, root_url, name));
|
| }
|
|
|
| FileSystemOperationInterface* FileSystemContext::CreateFileSystemOperation(
|
| const GURL& url,
|
| - scoped_ptr<FileSystemCallbackDispatcher> dispatcher,
|
| base::MessageLoopProxy* file_proxy) {
|
| GURL origin_url;
|
| FileSystemType file_system_type = kFileSystemTypeUnknown;
|
| @@ -190,8 +183,7 @@ FileSystemOperationInterface* FileSystemContext::CreateFileSystemOperation(
|
| if (!mount_point_provider)
|
| return NULL;
|
| return mount_point_provider->CreateFileSystemOperation(
|
| - origin_url, file_system_type, file_path,
|
| - dispatcher.Pass(), file_proxy, this);
|
| + origin_url, file_system_type, file_path, file_proxy, this);
|
| }
|
|
|
| } // namespace fileapi
|
|
|