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

Side by Side Diff: webkit/browser/fileapi/syncable/sync_file_system_backend.h

Issue 18668003: SyncFS: Introduce SyncFileSystemBackend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add Initialize() 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_BROWSER_FILEAPI_SYNCABLE_SYNC_FILE_SYSTEM_BACKEND_H_
6 #define WEBKIT_BROWSER_FILEAPI_SYNCABLE_SYNC_FILE_SYSTEM_BACKEND_H_
7
8 #include "webkit/browser/fileapi/sandbox_file_system_backend.h"
9 #include "webkit/browser/fileapi/syncable/local_file_change_tracker.h"
10 #include "webkit/browser/fileapi/syncable/local_file_sync_context.h"
11
12 namespace sync_file_system {
13
14 class WEBKIT_STORAGE_BROWSER_EXPORT SyncFileSystemBackend
15 : public fileapi::SandboxFileSystemBackend {
16 public:
17 SyncFileSystemBackend(
18 const fileapi::FileSystemOptions& file_system_options);
19 virtual ~SyncFileSystemBackend();
20
21 // FileSystemBackend overrides.
22 virtual bool CanHandleType(fileapi::FileSystemType type) const OVERRIDE;
23 virtual void Initialize(const fileapi::FileSystemContext* context) OVERRIDE;
24 virtual void InitializeFileSystem(
25 const GURL& origin_url,
26 fileapi::FileSystemType type,
27 fileapi::OpenFileSystemMode mode,
28 fileapi::FileSystemContext* context,
29 const InitializeFileSystemCallback& callback) OVERRIDE;
30 virtual fileapi::FileSystemFileUtil* GetFileUtil(
31 fileapi::FileSystemType type) OVERRIDE;
32 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil(
33 fileapi::FileSystemType type) OVERRIDE;
34 virtual fileapi::FileSystemOperation* CreateFileSystemOperation(
35 const fileapi::FileSystemURL& url,
36 fileapi::FileSystemContext* context,
37 base::PlatformFileError* error_code) const OVERRIDE;
38
39 // FileSystemQuotaUtil overrides.
40 virtual void GetOriginsForTypeOnFileThread(
41 fileapi::FileSystemType type,
42 std::set<GURL>* origins) OVERRIDE;
43 virtual void AddFileUpdateObserver(
44 fileapi::FileSystemType type,
45 fileapi::FileUpdateObserver* observer,
46 base::SequencedTaskRunner* task_runner) OVERRIDE;
47 virtual void AddFileChangeObserver(
48 fileapi::FileSystemType type,
49 fileapi::FileChangeObserver* observer,
50 base::SequencedTaskRunner* task_runner) OVERRIDE;
51 virtual const fileapi::UpdateObserverList* GetUpdateObservers(
52 fileapi::FileSystemType type) const OVERRIDE;
53 virtual const fileapi::ChangeObserverList* GetChangeObservers(
54 fileapi::FileSystemType type) const OVERRIDE;
55
56 static SyncFileSystemBackend* GetBackend(
57 const fileapi::FileSystemContext* file_system_context);
58
59 private:
60 friend class CannedSyncableFileSystem;
61
62 fileapi::UpdateObserverList syncable_update_observers_;
63 fileapi::ChangeObserverList syncable_change_observers_;
64
65 DISALLOW_COPY_AND_ASSIGN(SyncFileSystemBackend);
66 };
67
68 } // namespace sync_file_system
69
70 #endif // WEBKIT_BROWSER_FILEAPI_SYNCABLE_SYNC_FILE_SYSTEM_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698