1 // Copyright 2014 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 CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FILEAPI_BACKEND_DELEGATE_H_
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FILEAPI_BACKEND_DELEGATE_H_
8 #include "base/basictypes.h"
9 #include "base/files/file_util.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h"
15 class FileSystemContext
;
16 class FileStreamReader
;
18 class FileStreamWriter
;
20 } // namespace storage
23 namespace file_system_provider
{
25 // Delegate implementation of the some methods in chromeos::FileSystemBackend
26 // for provided file systems.
27 class BackendDelegate
: public chromeos::FileSystemBackendDelegate
{
30 ~BackendDelegate() override
;
32 // FileSystemBackend::Delegate overrides.
33 storage::AsyncFileUtil
* GetAsyncFileUtil(
34 storage::FileSystemType type
) override
;
35 scoped_ptr
<storage::FileStreamReader
> CreateFileStreamReader(
36 const storage::FileSystemURL
& url
,
38 int64 max_bytes_to_read
,
39 const base::Time
& expected_modification_time
,
40 storage::FileSystemContext
* context
) override
;
41 scoped_ptr
<storage::FileStreamWriter
> CreateFileStreamWriter(
42 const storage::FileSystemURL
& url
,
44 storage::FileSystemContext
* context
) override
;
45 storage::WatcherManager
* GetWatcherManager(
46 storage::FileSystemType type
) override
;
47 void GetRedirectURLForContents(const storage::FileSystemURL
& url
,
48 const storage::URLCallback
& callback
) override
;
51 scoped_ptr
<storage::AsyncFileUtil
> async_file_util_
;
52 scoped_ptr
<storage::WatcherManager
> watcher_manager_
;
54 DISALLOW_COPY_AND_ASSIGN(BackendDelegate
);
57 } // namespace file_system_provider
58 } // namespace chromeos
60 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FILEAPI_BACKEND_DELEGATE_H_