| Index: webkit/browser/fileapi/syncable/sync_file_system_backend.h
|
| diff --git a/webkit/browser/fileapi/syncable/sync_file_system_backend.h b/webkit/browser/fileapi/syncable/sync_file_system_backend.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..65adc2e29b45f97f7edda790c540bbb0e480f20d
|
| --- /dev/null
|
| +++ b/webkit/browser/fileapi/syncable/sync_file_system_backend.h
|
| @@ -0,0 +1,70 @@
|
| +// 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_SYNC_FILE_SYSTEM_BACKEND_H_
|
| +#define WEBKIT_BROWSER_FILEAPI_SYNCABLE_SYNC_FILE_SYSTEM_BACKEND_H_
|
| +
|
| +#include "webkit/browser/fileapi/sandbox_file_system_backend.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 SyncFileSystemBackend
|
| + : public fileapi::SandboxFileSystemBackend {
|
| + public:
|
| + SyncFileSystemBackend(
|
| + const fileapi::FileSystemOptions& file_system_options);
|
| + virtual ~SyncFileSystemBackend();
|
| +
|
| + // FileSystemBackend overrides.
|
| + virtual bool CanHandleType(fileapi::FileSystemType type) const OVERRIDE;
|
| + virtual void Initialize(const fileapi::FileSystemContext* context) OVERRIDE;
|
| + virtual void InitializeFileSystem(
|
| + const GURL& origin_url,
|
| + fileapi::FileSystemType type,
|
| + fileapi::OpenFileSystemMode mode,
|
| + fileapi::FileSystemContext* context,
|
| + const InitializeFileSystemCallback& callback) OVERRIDE;
|
| + virtual fileapi::FileSystemFileUtil* GetFileUtil(
|
| + fileapi::FileSystemType type) OVERRIDE;
|
| + virtual fileapi::AsyncFileUtil* GetAsyncFileUtil(
|
| + fileapi::FileSystemType type) OVERRIDE;
|
| + virtual fileapi::FileSystemOperation* CreateFileSystemOperation(
|
| + const fileapi::FileSystemURL& url,
|
| + fileapi::FileSystemContext* context,
|
| + base::PlatformFileError* error_code) const OVERRIDE;
|
| +
|
| + // FileSystemQuotaUtil overrides.
|
| + virtual void GetOriginsForTypeOnFileThread(
|
| + fileapi::FileSystemType type,
|
| + std::set<GURL>* origins) OVERRIDE;
|
| + 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;
|
| + virtual const fileapi::UpdateObserverList* GetUpdateObservers(
|
| + fileapi::FileSystemType type) const OVERRIDE;
|
| + virtual const fileapi::ChangeObserverList* GetChangeObservers(
|
| + fileapi::FileSystemType type) const OVERRIDE;
|
| +
|
| + static SyncFileSystemBackend* GetBackend(
|
| + const fileapi::FileSystemContext* file_system_context);
|
| +
|
| + private:
|
| + friend class CannedSyncableFileSystem;
|
| +
|
| + fileapi::UpdateObserverList syncable_update_observers_;
|
| + fileapi::ChangeObserverList syncable_change_observers_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SyncFileSystemBackend);
|
| +};
|
| +
|
| +} // namespace sync_file_system
|
| +
|
| +#endif // WEBKIT_BROWSER_FILEAPI_SYNCABLE_SYNC_FILE_SYSTEM_BACKEND_H_
|
|
|