| Index: webkit/fileapi/sandboxed_file_system_context.cc
|
| diff --git a/webkit/fileapi/sandboxed_file_system_context.cc b/webkit/fileapi/sandboxed_file_system_context.cc
|
| index b3b009e152749516e2b876a6636e008b53805685..16232d5d35cdf70f0c313f6237c50326f6a7874a 100644
|
| --- a/webkit/fileapi/sandboxed_file_system_context.cc
|
| +++ b/webkit/fileapi/sandboxed_file_system_context.cc
|
| @@ -13,11 +13,13 @@ namespace fileapi {
|
|
|
| SandboxedFileSystemContext::SandboxedFileSystemContext(
|
| scoped_refptr<base::MessageLoopProxy> file_message_loop,
|
| + scoped_refptr<base::MessageLoopProxy> io_message_loop,
|
| const FilePath& profile_path,
|
| bool is_incognito,
|
| bool allow_file_access,
|
| bool unlimited_quota)
|
| : file_message_loop_(file_message_loop),
|
| + io_message_loop_(io_message_loop),
|
| path_manager_(new FileSystemPathManager(
|
| file_message_loop, profile_path, is_incognito, allow_file_access)),
|
| quota_manager_(new FileSystemQuotaManager(
|
| @@ -28,6 +30,7 @@ SandboxedFileSystemContext::~SandboxedFileSystemContext() {
|
| }
|
|
|
| void SandboxedFileSystemContext::Shutdown() {
|
| + DCHECK(io_message_loop_->BelongsToCurrentThread());
|
| path_manager_.reset();
|
| quota_manager_.reset();
|
| }
|
| @@ -45,4 +48,22 @@ void SandboxedFileSystemContext::DeleteDataForOriginOnFileThread(
|
| file_util::Delete(path_for_origin, true /* recursive */);
|
| }
|
|
|
| +void SandboxedFileSystemContext::SetOriginQuotaUnlimited(const GURL& url) {
|
| + DCHECK(io_message_loop_->BelongsToCurrentThread());
|
| + quota_manager()->SetOriginQuotaUnlimited(url);
|
| +}
|
| +
|
| +void SandboxedFileSystemContext::ResetOriginQuotaUnlimited(const GURL& url) {
|
| + DCHECK(io_message_loop_->BelongsToCurrentThread());
|
| + quota_manager()->ResetOriginQuotaUnlimited(url);
|
| +}
|
| +
|
| +void SandboxedFileSystemContext::DeleteOnCorrectThread() const {
|
| + if (!io_message_loop_->BelongsToCurrentThread()) {
|
| + io_message_loop_->DeleteSoon(FROM_HERE, this);
|
| + return;
|
| + }
|
| + delete this;
|
| +}
|
| +
|
| } // namespace fileapi
|
|
|