Index: webkit/fileapi/file_system_context.cc |
diff --git a/webkit/fileapi/file_system_context.cc b/webkit/fileapi/file_system_context.cc |
index f0c596e35b538ac6eb9fc43ee0a04ade6bb7c080..a01e2f8faa949634e55857cbe24365d01b62b824 100644 |
--- a/webkit/fileapi/file_system_context.cc |
+++ b/webkit/fileapi/file_system_context.cc |
@@ -6,7 +6,7 @@ |
#include "base/bind.h" |
#include "base/file_util.h" |
-#include "base/message_loop_proxy.h" |
+#include "base/single_thread_task_runner.h" |
#include "googleurl/src/gurl.h" |
#include "webkit/fileapi/file_system_file_util.h" |
#include "webkit/fileapi/file_system_operation_interface.h" |
@@ -29,10 +29,9 @@ namespace fileapi { |
namespace { |
QuotaClient* CreateQuotaClient( |
- scoped_refptr<base::MessageLoopProxy> file_message_loop, |
FileSystemContext* context, |
bool is_incognito) { |
- return new FileSystemQuotaClient(file_message_loop, context, is_incognito); |
+ return new FileSystemQuotaClient(context, is_incognito); |
} |
void DidOpenFileSystem(FileSystemContext::OpenFileSystemCallback callback, |
@@ -45,24 +44,24 @@ void DidOpenFileSystem(FileSystemContext::OpenFileSystemCallback callback, |
} // anonymous namespace |
FileSystemContext::FileSystemContext( |
- scoped_refptr<base::MessageLoopProxy> file_message_loop, |
- scoped_refptr<base::MessageLoopProxy> io_message_loop, |
- scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy, |
+ base::SequencedTaskRunner* file_task_runner, |
+ base::SingleThreadTaskRunner* io_task_runner, |
+ quota::SpecialStoragePolicy* special_storage_policy, |
quota::QuotaManagerProxy* quota_manager_proxy, |
const FilePath& profile_path, |
const FileSystemOptions& options) |
- : file_message_loop_(file_message_loop), |
- io_message_loop_(io_message_loop), |
+ : file_task_runner_(file_task_runner), |
+ io_task_runner_(io_task_runner), |
quota_manager_proxy_(quota_manager_proxy), |
sandbox_provider_( |
new SandboxMountPointProvider( |
- file_message_loop, |
+ file_task_runner, |
profile_path, |
options)), |
isolated_provider_(new IsolatedMountPointProvider) { |
if (quota_manager_proxy) { |
quota_manager_proxy->RegisterClient(CreateQuotaClient( |
- file_message_loop, this, options.is_incognito())); |
+ this, options.is_incognito())); |
} |
#if defined(OS_CHROMEOS) |
external_provider_.reset( |
@@ -72,7 +71,7 @@ FileSystemContext::FileSystemContext( |
bool FileSystemContext::DeleteDataForOriginOnFileThread( |
const GURL& origin_url) { |
- DCHECK(file_message_loop_->BelongsToCurrentThread()); |
+ DCHECK(file_task_runner_->RunsTasksOnCurrentThread()); |
DCHECK(sandbox_provider()); |
// Delete temporary and persistent data. |
@@ -85,7 +84,7 @@ bool FileSystemContext::DeleteDataForOriginOnFileThread( |
bool FileSystemContext::DeleteDataForOriginAndTypeOnFileThread( |
const GURL& origin_url, FileSystemType type) { |
- DCHECK(file_message_loop_->BelongsToCurrentThread()); |
+ DCHECK(file_task_runner_->RunsTasksOnCurrentThread()); |
if (type == fileapi::kFileSystemTypeTemporary || |
type == fileapi::kFileSystemTypePersistent) { |
DCHECK(sandbox_provider()); |
@@ -164,8 +163,7 @@ void FileSystemContext::OpenFileSystem( |
} |
FileSystemOperationInterface* FileSystemContext::CreateFileSystemOperation( |
- const GURL& url, |
- base::MessageLoopProxy* file_proxy) { |
+ const GURL& url) { |
GURL origin_url; |
FileSystemType file_system_type = kFileSystemTypeUnknown; |
FilePath file_path; |
@@ -176,13 +174,12 @@ FileSystemOperationInterface* FileSystemContext::CreateFileSystemOperation( |
if (!mount_point_provider) |
return NULL; |
return mount_point_provider->CreateFileSystemOperation( |
- origin_url, file_system_type, file_path, file_proxy, this); |
+ origin_url, file_system_type, file_path, this); |
} |
webkit_blob::FileReader* FileSystemContext::CreateFileReader( |
const GURL& url, |
- int64 offset, |
- base::MessageLoopProxy* file_proxy) { |
+ int64 offset) { |
GURL origin_url; |
FileSystemType file_system_type = kFileSystemTypeUnknown; |
FilePath file_path; |
@@ -192,14 +189,14 @@ webkit_blob::FileReader* FileSystemContext::CreateFileReader( |
GetMountPointProvider(file_system_type); |
if (!mount_point_provider) |
return NULL; |
- return mount_point_provider->CreateFileReader(url, offset, file_proxy, this); |
+ return mount_point_provider->CreateFileReader(url, offset, this); |
} |
FileSystemContext::~FileSystemContext() {} |
void FileSystemContext::DeleteOnCorrectThread() const { |
- if (!io_message_loop_->BelongsToCurrentThread() && |
- io_message_loop_->DeleteSoon(FROM_HERE, this)) { |
+ if (!io_task_runner_->RunsTasksOnCurrentThread() && |
+ io_task_runner_->DeleteSoon(FROM_HERE, this)) { |
return; |
} |
delete this; |