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

Unified Diff: webkit/fileapi/sandboxed_file_system_context.h

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 | « chrome/test/testing_profile.h ('k') | webkit/fileapi/sandboxed_file_system_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/sandboxed_file_system_context.h
diff --git a/webkit/fileapi/sandboxed_file_system_context.h b/webkit/fileapi/sandboxed_file_system_context.h
index 6c72bc0031d6f54b199e5bccc3152865f937bdaf..fcb90bb4fc2422b140e08bac9054127052be8499 100644
--- a/webkit/fileapi/sandboxed_file_system_context.h
+++ b/webkit/fileapi/sandboxed_file_system_context.h
@@ -24,10 +24,13 @@ class SandboxedFileSystemContext;
struct DefaultContextDeleter;
// This class keeps and provides a sandboxed file system context.
-class SandboxedFileSystemContext {
+class SandboxedFileSystemContext
+ : public base::RefCountedThreadSafe<SandboxedFileSystemContext,
+ DefaultContextDeleter> {
public:
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_from_files,
@@ -38,6 +41,10 @@ class SandboxedFileSystemContext {
void DeleteDataForOriginOnFileThread(const GURL& origin_url);
+ // Quota related methods.
+ void SetOriginQuotaUnlimited(const GURL& url);
+ void ResetOriginQuotaUnlimited(const GURL& url);
+
FileSystemPathManager* path_manager() { return path_manager_.get(); }
FileSystemQuotaManager* quota_manager() { return quota_manager_.get(); }
@@ -47,12 +54,19 @@ class SandboxedFileSystemContext {
bool allow_file_access_from_files_;
scoped_refptr<base::MessageLoopProxy> file_message_loop_;
+ scoped_refptr<base::MessageLoopProxy> io_message_loop_;
scoped_ptr<FileSystemPathManager> path_manager_;
scoped_ptr<FileSystemQuotaManager> quota_manager_;
DISALLOW_IMPLICIT_CONSTRUCTORS(SandboxedFileSystemContext);
};
+struct DefaultContextDeleter {
+ static void Destruct(const SandboxedFileSystemContext* context) {
+ context->DeleteOnCorrectThread();
+ }
+};
+
} // namespace fileapi
#endif // WEBKIT_FILEAPI_SANDBOXED_FILE_SYSTEM_CONTEXT_H_
« no previous file with comments | « chrome/test/testing_profile.h ('k') | webkit/fileapi/sandboxed_file_system_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698