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

Unified Diff: webkit/browser/fileapi/syncable/syncable_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/syncable/syncable_sandbox_mount_point_provider.h
diff --git a/webkit/browser/fileapi/syncable/syncable_sandbox_mount_point_provider.h b/webkit/browser/fileapi/syncable/syncable_sandbox_mount_point_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..200d391a0e9be09e03e05c52d9e3fc14d739dc11
--- /dev/null
+++ b/webkit/browser/fileapi/syncable/syncable_sandbox_mount_point_provider.h
@@ -0,0 +1,72 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_BROWSER_FILEAPI_SYNCABLE_SYNCABLE_SANDBOX_MOUNT_POINT_PROVIDER_H_
+#define WEBKIT_BROWSER_FILEAPI_SYNCABLE_SYNCABLE_SANDBOX_MOUNT_POINT_PROVIDER_H_
+
+#include "webkit/browser/fileapi/sandbox_mount_point_provider.h"
+#include "webkit/browser/fileapi/syncable/local_file_change_tracker.h"
+#include "webkit/browser/fileapi/syncable/local_file_sync_context.h"
+
+namespace sync_file_system {
+
+class WEBKIT_STORAGE_BROWSER_EXPORT SyncableSandboxMountPointProvider
+ : public fileapi::SandboxMountPointProvider {
kinuko 2013/07/08 12:31:20 Fyi2, we're changing the MountPointProvider naming
nhiroki 2013/07/22 04:34:14 Thanks! Rebased and renamed.
+ public:
+ SyncableSandboxMountPointProvider(
+ quota::QuotaManagerProxy* quota_manager_proxy,
+ base::SequencedTaskRunner* file_task_runner,
+ const base::FilePath& profile_path,
+ const fileapi::FileSystemOptions& file_system_options,
+ quota::SpecialStoragePolicy* special_storage_policy);
+ virtual ~SyncableSandboxMountPointProvider();
+
+ // FileSystemMountPointProvider overrides.
+ virtual bool CanHandleType(fileapi::FileSystemType type) const OVERRIDE;
+ virtual GURL GetRootURI(const GURL& origin_url,
+ fileapi::FileSystemType type) const OVERRIDE;
+ virtual fileapi::FileSystemOperation* CreateFileSystemOperation(
+ const fileapi::FileSystemURL& url,
+ fileapi::FileSystemContext* context,
+ base::PlatformFileError* error_code) const OVERRIDE;
+ virtual const fileapi::UpdateObserverList* GetUpdateObservers(
+ fileapi::FileSystemType type) const OVERRIDE;
+
+ // FileSystemQuotaUtil overrides.
+ virtual void GetOriginsForTypeOnFileThread(
+ fileapi::FileSystemType type,
+ std::set<GURL>* origins) OVERRIDE;
+
+ // SandboxMountPointProvider overrides.
+ virtual void AddFileUpdateObserver(
+ fileapi::FileSystemType type,
+ fileapi::FileUpdateObserver* observer,
+ base::SequencedTaskRunner* task_runner) OVERRIDE;
+ virtual void AddFileChangeObserver(
+ fileapi::FileSystemType type,
+ fileapi::FileChangeObserver* observer,
+ base::SequencedTaskRunner* task_runner) OVERRIDE;
+
+ static SyncableSandboxMountPointProvider* GetProvider(
+ const fileapi::FileSystemContext* file_system_context);
+
+ LocalFileChangeTracker* change_tracker() { return change_tracker_.get(); }
+ void set_change_tracker(scoped_ptr<LocalFileChangeTracker> tracker);
+
+ LocalFileSyncContext* sync_context() { return sync_context_.get(); }
+ void set_sync_context(sync_file_system::LocalFileSyncContext* sync_context);
+
+ private:
+ fileapi::UpdateObserverList syncable_update_observers_;
+ fileapi::ChangeObserverList syncable_change_observers_;
+
+ scoped_ptr<LocalFileChangeTracker> change_tracker_;
+ scoped_refptr<sync_file_system::LocalFileSyncContext> sync_context_;
+
+ DISALLOW_COPY_AND_ASSIGN(SyncableSandboxMountPointProvider);
+};
+
+} // namespace sync_file_system
+
+#endif // WEBKIT_BROWSER_FILEAPI_SYNCABLE_SYNCABLE_SANDBOX_MOUNT_POINT_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698