When enabling new profile management programmatically, make sure to set the
[chromium-blink-merge.git] / webkit / browser / fileapi / isolated_file_system_backend.h
blob1c2edfddd271de8add36e52666297cdcd8a50367
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
3 // found in the LICENSE file.
5 #ifndef WEBKIT_BROWSER_FILEAPI_ISOLATED_FILE_SYSTEM_BACKEND_H_
6 #define WEBKIT_BROWSER_FILEAPI_ISOLATED_FILE_SYSTEM_BACKEND_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "webkit/browser/fileapi/file_system_backend.h"
11 namespace fileapi {
13 class AsyncFileUtilAdapter;
15 class IsolatedFileSystemBackend : public FileSystemBackend {
16 public:
17 IsolatedFileSystemBackend();
18 virtual ~IsolatedFileSystemBackend();
20 // FileSystemBackend implementation.
21 virtual bool CanHandleType(FileSystemType type) const OVERRIDE;
22 virtual void Initialize(FileSystemContext* context) OVERRIDE;
23 virtual void ResolveURL(const FileSystemURL& url,
24 OpenFileSystemMode mode,
25 const OpenFileSystemCallback& callback) OVERRIDE;
26 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE;
27 virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory(
28 FileSystemType type,
29 base::File::Error* error_code) OVERRIDE;
30 virtual FileSystemOperation* CreateFileSystemOperation(
31 const FileSystemURL& url,
32 FileSystemContext* context,
33 base::File::Error* error_code) const OVERRIDE;
34 virtual bool SupportsStreaming(const FileSystemURL& url) const OVERRIDE;
35 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader(
36 const FileSystemURL& url,
37 int64 offset,
38 const base::Time& expected_modification_time,
39 FileSystemContext* context) const OVERRIDE;
40 virtual scoped_ptr<FileStreamWriter> CreateFileStreamWriter(
41 const FileSystemURL& url,
42 int64 offset,
43 FileSystemContext* context) const OVERRIDE;
44 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE;
46 private:
47 scoped_ptr<AsyncFileUtilAdapter> isolated_file_util_;
48 scoped_ptr<AsyncFileUtilAdapter> dragged_file_util_;
49 scoped_ptr<AsyncFileUtilAdapter> transient_file_util_;
52 } // namespace fileapi
54 #endif // WEBKIT_BROWSER_FILEAPI_ISOLATED_FILE_SYSTEM_BACKEND_H_