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

Side by Side Diff: webkit/browser/fileapi/isolated_file_system_backend.h

Issue 18668003: SyncFS: Introduce SyncFileSystemBackend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lazy initialization 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_BROWSER_FILEAPI_ISOLATED_FILE_SYSTEM_BACKEND_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_ISOLATED_FILE_SYSTEM_BACKEND_H_
6 #define WEBKIT_BROWSER_FILEAPI_ISOLATED_FILE_SYSTEM_BACKEND_H_ 6 #define WEBKIT_BROWSER_FILEAPI_ISOLATED_FILE_SYSTEM_BACKEND_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "webkit/browser/fileapi/file_system_backend.h" 9 #include "webkit/browser/fileapi/file_system_backend.h"
10 10
11 namespace fileapi { 11 namespace fileapi {
12 12
13 class AsyncFileUtilAdapter; 13 class AsyncFileUtilAdapter;
14 14
15 class IsolatedFileSystemBackend : public FileSystemBackend { 15 class IsolatedFileSystemBackend : public FileSystemBackend {
16 public: 16 public:
17 IsolatedFileSystemBackend(); 17 IsolatedFileSystemBackend();
18 virtual ~IsolatedFileSystemBackend(); 18 virtual ~IsolatedFileSystemBackend();
19 19
20 // FileSystemBackend implementation. 20 // FileSystemBackend implementation.
21 virtual bool CanHandleType(FileSystemType type) const OVERRIDE; 21 virtual bool CanHandleType(FileSystemType type) const OVERRIDE;
22 virtual void InitializeFileSystem( 22 virtual void InitializeFileSystem(
23 const GURL& origin_url, 23 const GURL& origin_url,
24 FileSystemType type, 24 FileSystemType type,
25 OpenFileSystemMode mode, 25 OpenFileSystemMode mode,
26 FileSystemContext* context, 26 FileSystemContext* context,
27 const InitializeFileSystemCallback& callback) OVERRIDE; 27 const InitializeFileSystemCallback& callback) OVERRIDE;
28 virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) OVERRIDE; 28 virtual FileSystemFileUtil* GetFileUtil(
29 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE; 29 FileSystemType type,
30 const FileSystemContext* context) OVERRIDE;
31 virtual AsyncFileUtil* GetAsyncFileUtil(
32 FileSystemType type,
33 const FileSystemContext* context) OVERRIDE;
30 virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( 34 virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory(
31 FileSystemType type, 35 FileSystemType type,
32 base::PlatformFileError* error_code) OVERRIDE; 36 base::PlatformFileError* error_code) OVERRIDE;
33 virtual FileSystemOperation* CreateFileSystemOperation( 37 virtual FileSystemOperation* CreateFileSystemOperation(
34 const FileSystemURL& url, 38 const FileSystemURL& url,
35 FileSystemContext* context, 39 FileSystemContext* context,
36 base::PlatformFileError* error_code) const OVERRIDE; 40 base::PlatformFileError* error_code) const OVERRIDE;
37 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( 41 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader(
38 const FileSystemURL& url, 42 const FileSystemURL& url,
39 int64 offset, 43 int64 offset,
40 const base::Time& expected_modification_time, 44 const base::Time& expected_modification_time,
41 FileSystemContext* context) const OVERRIDE; 45 FileSystemContext* context) const OVERRIDE;
42 virtual scoped_ptr<FileStreamWriter> CreateFileStreamWriter( 46 virtual scoped_ptr<FileStreamWriter> CreateFileStreamWriter(
43 const FileSystemURL& url, 47 const FileSystemURL& url,
44 int64 offset, 48 int64 offset,
45 FileSystemContext* context) const OVERRIDE; 49 FileSystemContext* context) const OVERRIDE;
46 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; 50 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE;
47 51
48 private: 52 private:
49 scoped_ptr<AsyncFileUtilAdapter> isolated_file_util_; 53 scoped_ptr<AsyncFileUtilAdapter> isolated_file_util_;
50 scoped_ptr<AsyncFileUtilAdapter> dragged_file_util_; 54 scoped_ptr<AsyncFileUtilAdapter> dragged_file_util_;
51 scoped_ptr<AsyncFileUtilAdapter> transient_file_util_; 55 scoped_ptr<AsyncFileUtilAdapter> transient_file_util_;
52 }; 56 };
53 57
54 } // namespace fileapi 58 } // namespace fileapi
55 59
56 #endif // WEBKIT_BROWSER_FILEAPI_ISOLATED_FILE_SYSTEM_BACKEND_H_ 60 #endif // WEBKIT_BROWSER_FILEAPI_ISOLATED_FILE_SYSTEM_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698