Index: webkit/fileapi/file_system_context.cc |
diff --git a/webkit/fileapi/file_system_context.cc b/webkit/fileapi/file_system_context.cc |
index e64f4979edbc420f1892881799b0d9e1d748ec00..db145957a82e21342b370bd7e78673a1d76af0d6 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,10 @@ namespace fileapi { |
namespace { |
QuotaClient* CreateQuotaClient( |
- scoped_refptr<base::MessageLoopProxy> file_message_loop, |
+ base::TaskRunner* file_task_runner, |
FileSystemContext* context, |
bool is_incognito) { |
- return new FileSystemQuotaClient(file_message_loop, context, is_incognito); |
+ return new FileSystemQuotaClient(file_task_runner, context, is_incognito); |
} |
void DidOpenFileSystem(FileSystemContext::OpenFileSystemCallback callback, |
@@ -45,24 +45,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::SingleThreadTaskRunner* 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())); |
+ file_task_runner, this, options.is_incognito())); |
} |
#if defined(OS_CHROMEOS) |
external_provider_.reset( |
@@ -75,7 +75,7 @@ FileSystemContext::~FileSystemContext() { |
bool FileSystemContext::DeleteDataForOriginOnFileThread( |
const GURL& origin_url) { |
- DCHECK(file_message_loop_->BelongsToCurrentThread()); |
+ DCHECK(file_task_runner_->BelongsToCurrentThread()); |
DCHECK(sandbox_provider()); |
// Delete temporary and persistent data. |
@@ -88,7 +88,7 @@ bool FileSystemContext::DeleteDataForOriginOnFileThread( |
bool FileSystemContext::DeleteDataForOriginAndTypeOnFileThread( |
const GURL& origin_url, FileSystemType type) { |
- DCHECK(file_message_loop_->BelongsToCurrentThread()); |
+ DCHECK(file_task_runner_->BelongsToCurrentThread()); |
if (type == fileapi::kFileSystemTypeTemporary || |
type == fileapi::kFileSystemTypePersistent) { |
DCHECK(sandbox_provider()); |
@@ -145,8 +145,8 @@ FileSystemContext::external_provider() const { |
} |
void FileSystemContext::DeleteOnCorrectThread() const { |
- if (!io_message_loop_->BelongsToCurrentThread() && |
- io_message_loop_->DeleteSoon(FROM_HERE, this)) { |
+ if (file_task_runner_->BelongsToCurrentThread() && |
michaeln
2012/04/27 01:04:03
Why the change from !IsOnIOThread to IsOnFileThrea
kinuko
2012/04/27 10:10:29
Sorry this change was not intended. Fixed.
|
+ io_task_runner_->DeleteSoon(FROM_HERE, this)) { |
return; |
} |
delete this; |
@@ -176,7 +176,7 @@ void FileSystemContext::OpenFileSystem( |
FileSystemOperationInterface* FileSystemContext::CreateFileSystemOperation( |
const GURL& url, |
- base::MessageLoopProxy* file_proxy) { |
+ base::TaskRunner* file_proxy) { |
GURL origin_url; |
FileSystemType file_system_type = kFileSystemTypeUnknown; |
FilePath file_path; |
@@ -193,7 +193,7 @@ FileSystemOperationInterface* FileSystemContext::CreateFileSystemOperation( |
webkit_blob::FileReader* FileSystemContext::CreateFileReader( |
const GURL& url, |
int64 offset, |
- base::MessageLoopProxy* file_proxy) { |
+ base::TaskRunner* file_proxy) { |
GURL origin_url; |
FileSystemType file_system_type = kFileSystemTypeUnknown; |
FilePath file_path; |