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

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: review fix 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 OpenFileSystem(
25 const GURL& origin_url,
26 fileapi::FileSystemType type,
27 fileapi::OpenFileSystemMode mode,
28 const OpenFileSystemCallback& callback) OVERRIDE;
29 virtual fileapi::FileSystemFileUtil* GetFileUtil(
30 fileapi::FileSystemType type) OVERRIDE;
31 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil(
32 fileapi::FileSystemType type) OVERRIDE;
33 virtual fileapi::FileSystemOperation* CreateFileSystemOperation(
34 const fileapi::FileSystemURL& url,
35 fileapi::FileSystemContext* context,
36 base::PlatformFileError* error_code) const OVERRIDE;
37
38 // FileSystemQuotaUtil overrides.
39 virtual void AddFileUpdateObserver(
40 fileapi::FileSystemType type,
41 fileapi::FileUpdateObserver* observer,
42 base::SequencedTaskRunner* task_runner) OVERRIDE;
43 virtual void AddFileChangeObserver(
44 fileapi::FileSystemType type,
45 fileapi::FileChangeObserver* observer,
46 base::SequencedTaskRunner* task_runner) OVERRIDE;
47 virtual const fileapi::UpdateObserverList* GetUpdateObservers(
48 fileapi::FileSystemType type) const OVERRIDE;
49 virtual const fileapi::ChangeObserverList* GetChangeObservers(
50 fileapi::FileSystemType type) const OVERRIDE;
51
52 static SyncFileSystemBackend* GetBackend(
53 const fileapi::FileSystemContext* file_system_context);
54
55 private:
56 fileapi::UpdateObserverList syncable_update_observers_;
57 fileapi::ChangeObserverList syncable_change_observers_;
58
59 DISALLOW_COPY_AND_ASSIGN(SyncFileSystemBackend);
60 };
61
62 } // namespace sync_file_system
63
64 #endif // WEBKIT_BROWSER_FILEAPI_SYNCABLE_SYNC_FILE_SYSTEM_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698