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

Unified Diff: webkit/browser/fileapi/sandbox_context.h

Issue 21305005: FileAPI: Move OpenFileSystem into SandboxContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 5 months 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 | « no previous file | webkit/browser/fileapi/sandbox_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/fileapi/sandbox_context.h
diff --git a/webkit/browser/fileapi/sandbox_context.h b/webkit/browser/fileapi/sandbox_context.h
index 98a1b21023992e244d6e068f7ed19f53d034cabe..c765077b8d381ecc54f02d9591be49ac3ebfcfa0 100644
--- a/webkit/browser/fileapi/sandbox_context.h
+++ b/webkit/browser/fileapi/sandbox_context.h
@@ -12,6 +12,8 @@
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
+#include "base/time/time.h"
#include "webkit/browser/fileapi/file_system_backend.h"
#include "webkit/browser/fileapi/file_system_options.h"
#include "webkit/browser/fileapi/file_system_quota_util.h"
@@ -40,6 +42,8 @@ class SandboxQuotaObserver;
// An instance of this class is created and owned by FileSystemContext.
class WEBKIT_STORAGE_BROWSER_EXPORT SandboxContext {
public:
+ typedef FileSystemBackend::OpenFileSystemCallback OpenFileSystemCallback;
+
// The FileSystem directory name.
static const base::FilePath::CharType kFileSystemDirectory[];
@@ -88,6 +92,14 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxContext {
FileSystemType type,
bool create);
+ // FileSystemBackend helpers.
+ void OpenFileSystem(
+ const GURL& origin_url,
+ FileSystemType type,
+ OpenFileSystemMode mode,
+ const OpenFileSystemCallback& callback,
+ const GURL& root_url);
+
// FileSystemQuotaUtil helpers.
base::PlatformFileError DeleteOriginDataOnFileThread(
FileSystemContext* context,
@@ -112,6 +124,8 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxContext {
const GURL& origin_url,
FileSystemType type);
+ void CollectOpenFileSystemMetrics(base::PlatformFileError error_code);
+
base::SequencedTaskRunner* file_task_runner() {
return file_task_runner_.get();
}
@@ -163,6 +177,10 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxContext {
std::set<std::pair<GURL, FileSystemType> > sticky_dirty_origins_;
+ base::Time next_release_time_for_open_filesystem_stat_;
+
+ base::WeakPtrFactory<SandboxContext> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(SandboxContext);
};
« no previous file with comments | « no previous file | webkit/browser/fileapi/sandbox_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698