Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: webkit/fileapi/sandboxed_file_system_context.cc

Issue 5633008: Remove BrowserFileSystemContext class (merge into SandboxedFSContext) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/fileapi/sandboxed_file_system_context.h ('k') | webkit/fileapi/sandboxed_file_system_operation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « webkit/fileapi/sandboxed_file_system_context.h ('k') | webkit/fileapi/sandboxed_file_system_operation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698