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

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

Issue 18668003: SyncFS: Introduce SyncFileSystemBackend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lazy initialization 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
Index: webkit/browser/fileapi/sandbox_file_system_backend.h
diff --git a/webkit/browser/fileapi/sandbox_file_system_backend.h b/webkit/browser/fileapi/sandbox_file_system_backend.h
index 5ac590f6bc4a9316a0358bd9de870d757346a0ab..19d9004e789a42cb062f83888b6e439902ffee7c 100644
--- a/webkit/browser/fileapi/sandbox_file_system_backend.h
+++ b/webkit/browser/fileapi/sandbox_file_system_backend.h
@@ -68,6 +68,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackend
SandboxFileSystemBackend(
SandboxContext* sandbox_context,
+ base::SequencedTaskRunner* file_task_runner,
const FileSystemOptions& file_system_options);
virtual ~SandboxFileSystemBackend();
@@ -79,8 +80,12 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackend
OpenFileSystemMode mode,
FileSystemContext* context,
const InitializeFileSystemCallback& callback) OVERRIDE;
- virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) OVERRIDE;
- virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE;
+ virtual FileSystemFileUtil* GetFileUtil(
+ FileSystemType type,
+ const FileSystemContext* context) OVERRIDE;
+ virtual AsyncFileUtil* GetAsyncFileUtil(
+ FileSystemType type,
+ const FileSystemContext* context) OVERRIDE;
virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory(
FileSystemType type,
base::PlatformFileError* error_code) OVERRIDE;
@@ -166,6 +171,21 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackend
enable_temporary_file_system_in_incognito_ = enable;
}
+ protected:
+ SandboxContext* sandbox_context_; // Not owned.
+
+ scoped_refptr<base::SequencedTaskRunner> file_task_runner_;
+
+ // Observers.
+ UpdateObserverList update_observers_;
+ ChangeObserverList change_observers_;
+ AccessObserverList access_observers_;
+
+ // Indicates if the usage tracking for FileSystem is enabled or not.
+ // The usage tracking is enabled by default and can be disabled by
+ // a command-line switch (--disable-file-system-usage-tracking).
+ bool enable_usage_tracking_;
+
private:
friend class SandboxQuotaObserver;
friend class SandboxFileSystemTestHelper;
@@ -201,32 +221,16 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackend
const GURL& origin,
FileSystemType type);
- SandboxContext* sandbox_context_; // Not owned.
-
FileSystemOptions file_system_options_;
bool enable_temporary_file_system_in_incognito_;
// Acccessed only on the file thread.
std::set<GURL> visited_origins_;
- // Observers.
- UpdateObserverList update_observers_;
- ChangeObserverList change_observers_;
- AccessObserverList access_observers_;
-
- // Observers for syncable file systems.
- UpdateObserverList syncable_update_observers_;
- ChangeObserverList syncable_change_observers_;
-
base::Time next_release_time_for_open_filesystem_stat_;
std::set<std::pair<GURL, FileSystemType> > sticky_dirty_origins_;
- // Indicates if the usage tracking for FileSystem is enabled or not.
- // The usage tracking is enabled by default and can be disabled by
- // a command-line switch (--disable-file-system-usage-tracking).
- bool enable_usage_tracking_;
-
base::WeakPtrFactory<SandboxFileSystemBackend> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(SandboxFileSystemBackend);
@@ -234,4 +238,4 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackend
} // namespace fileapi
-#endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_
+#endif /// WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_

Powered by Google App Engine
This is Rietveld 408576698