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

Side by Side 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 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_SYNCABLE_SANDBOX_MOUNT_POINT_PROVIDER_H_
6 #define WEBKIT_BROWSER_FILEAPI_SYNCABLE_SYNCABLE_SANDBOX_MOUNT_POINT_PROVIDER_H_
7
8 #include "webkit/browser/fileapi/sandbox_mount_point_provider.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 SyncableSandboxMountPointProvider
15 : 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.
16 public:
17 SyncableSandboxMountPointProvider(
18 quota::QuotaManagerProxy* quota_manager_proxy,
19 base::SequencedTaskRunner* file_task_runner,
20 const base::FilePath& profile_path,
21 const fileapi::FileSystemOptions& file_system_options,
22 quota::SpecialStoragePolicy* special_storage_policy);
23 virtual ~SyncableSandboxMountPointProvider();
24
25 // FileSystemMountPointProvider overrides.
26 virtual bool CanHandleType(fileapi::FileSystemType type) const OVERRIDE;
27 virtual GURL GetRootURI(const GURL& origin_url,
28 fileapi::FileSystemType type) const OVERRIDE;
29 virtual fileapi::FileSystemOperation* CreateFileSystemOperation(
30 const fileapi::FileSystemURL& url,
31 fileapi::FileSystemContext* context,
32 base::PlatformFileError* error_code) const OVERRIDE;
33 virtual const fileapi::UpdateObserverList* GetUpdateObservers(
34 fileapi::FileSystemType type) const OVERRIDE;
35
36 // FileSystemQuotaUtil overrides.
37 virtual void GetOriginsForTypeOnFileThread(
38 fileapi::FileSystemType type,
39 std::set<GURL>* origins) OVERRIDE;
40
41 // SandboxMountPointProvider overrides.
42 virtual void AddFileUpdateObserver(
43 fileapi::FileSystemType type,
44 fileapi::FileUpdateObserver* observer,
45 base::SequencedTaskRunner* task_runner) OVERRIDE;
46 virtual void AddFileChangeObserver(
47 fileapi::FileSystemType type,
48 fileapi::FileChangeObserver* observer,
49 base::SequencedTaskRunner* task_runner) OVERRIDE;
50
51 static SyncableSandboxMountPointProvider* GetProvider(
52 const fileapi::FileSystemContext* file_system_context);
53
54 LocalFileChangeTracker* change_tracker() { return change_tracker_.get(); }
55 void set_change_tracker(scoped_ptr<LocalFileChangeTracker> tracker);
56
57 LocalFileSyncContext* sync_context() { return sync_context_.get(); }
58 void set_sync_context(sync_file_system::LocalFileSyncContext* sync_context);
59
60 private:
61 fileapi::UpdateObserverList syncable_update_observers_;
62 fileapi::ChangeObserverList syncable_change_observers_;
63
64 scoped_ptr<LocalFileChangeTracker> change_tracker_;
65 scoped_refptr<sync_file_system::LocalFileSyncContext> sync_context_;
66
67 DISALLOW_COPY_AND_ASSIGN(SyncableSandboxMountPointProvider);
68 };
69
70 } // namespace sync_file_system
71
72 #endif // WEBKIT_BROWSER_FILEAPI_SYNCABLE_SYNCABLE_SANDBOX_MOUNT_POINT_PROVIDER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698