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

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

Issue 18668003: SyncFS: Introduce SyncFileSystemBackend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_mount_point_provider.h
diff --git a/webkit/browser/fileapi/sandbox_mount_point_provider.h b/webkit/browser/fileapi/sandbox_mount_point_provider.h
index 99e91f073caa31788905f5a2e95ecdb7075ae434..337a29a36a95ea4875ec732cdf9adb53e8149c2f 100644
--- a/webkit/browser/fileapi/sandbox_mount_point_provider.h
+++ b/webkit/browser/fileapi/sandbox_mount_point_provider.h
@@ -31,11 +31,6 @@ class QuotaManagerProxy;
class SpecialStoragePolicy;
}
-namespace sync_file_system {
-class CannedSyncableFileSystem;
-class SyncableFileSystemOperation;
-}
-
namespace fileapi {
class AsyncFileUtilAdapter;
@@ -81,6 +76,8 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxMountPointProvider
// FileSystemMountPointProvider overrides.
virtual bool CanHandleType(FileSystemType type) const OVERRIDE;
+ virtual GURL GetRootURI(const GURL& origin_url,
+ FileSystemType type) const OVERRIDE;
virtual void OpenFileSystem(
const GURL& origin_url,
FileSystemType type,
@@ -105,6 +102,8 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxMountPointProvider
int64 offset,
FileSystemContext* context) const OVERRIDE;
virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE;
+ virtual const UpdateObserverList* GetUpdateObservers(
+ FileSystemType type) const OVERRIDE;
// Returns an origin enumerator of this provider.
// This method can only be called on the file thread.
@@ -146,16 +145,15 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxMountPointProvider
void CollectOpenFileSystemMetrics(base::PlatformFileError error_code);
- // Returns observers for the given type.
- const UpdateObserverList* GetUpdateObservers(FileSystemType type) const;
+ // Returns access observers for the given type.
const AccessObserverList* GetAccessObservers(FileSystemType type) const;
- void AddFileUpdateObserver(FileSystemType type,
- FileUpdateObserver* observer,
- base::SequencedTaskRunner* task_runner);
- void AddFileChangeObserver(FileSystemType type,
- FileChangeObserver* observer,
- base::SequencedTaskRunner* task_runner);
+ virtual void AddFileUpdateObserver(FileSystemType type,
+ FileUpdateObserver* observer,
+ base::SequencedTaskRunner* task_runner);
+ virtual void AddFileChangeObserver(FileSystemType type,
+ FileChangeObserver* observer,
+ base::SequencedTaskRunner* task_runner);
// Performs API-specific validity checks on the given path |url|.
// Returns true if access to |url| is valid in this filesystem.
@@ -165,6 +163,22 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxMountPointProvider
enable_temporary_file_system_in_incognito_ = enable;
}
+ protected:
+ scoped_refptr<base::SequencedTaskRunner> file_task_runner_;
+
+ // Observers.
+ UpdateObserverList update_observers_;
+ ChangeObserverList change_observers_;
+ AccessObserverList access_observers_;
+
+ scoped_ptr<AsyncFileUtilAdapter> sandbox_file_util_;
+ scoped_ptr<SandboxQuotaObserver> quota_observer_;
+
+ // 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;
@@ -203,40 +217,20 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxMountPointProvider
const GURL& origin,
FileSystemType type);
- scoped_refptr<base::SequencedTaskRunner> file_task_runner_;
-
const base::FilePath profile_path_;
FileSystemOptions file_system_options_;
bool enable_temporary_file_system_in_incognito_;
- scoped_ptr<AsyncFileUtilAdapter> sandbox_file_util_;
-
scoped_ptr<FileSystemUsageCache> file_system_usage_cache_;
- scoped_ptr<SandboxQuotaObserver> quota_observer_;
-
// 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_;
-
scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
base::WeakPtrFactory<SandboxMountPointProvider> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698