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.
5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_BACKEND_DELEGATE_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_BACKEND_DELEGATE_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h"
14 } // namespace content
18 } // namespace fileapi
22 // Delegate implementation of the some methods in chromeos::FileSystemBackend
23 // for Drive file system.
24 class FileSystemBackendDelegate
: public chromeos::FileSystemBackendDelegate
{
26 // |browser_context| is used to obtain |profile_id_|.
27 explicit FileSystemBackendDelegate(content::BrowserContext
* browser_context
);
28 virtual ~FileSystemBackendDelegate();
30 // FileSystemBackend::Delegate overrides.
31 virtual fileapi::AsyncFileUtil
* GetAsyncFileUtil(
32 fileapi::FileSystemType type
) OVERRIDE
;
33 virtual scoped_ptr
<webkit_blob::FileStreamReader
> CreateFileStreamReader(
34 const fileapi::FileSystemURL
& url
,
36 const base::Time
& expected_modification_time
,
37 fileapi::FileSystemContext
* context
) OVERRIDE
;
38 virtual scoped_ptr
<fileapi::FileStreamWriter
> CreateFileStreamWriter(
39 const fileapi::FileSystemURL
& url
,
41 fileapi::FileSystemContext
* context
) OVERRIDE
;
44 // The profile for processing Drive accesses. Should not be NULL.
46 scoped_ptr
<fileapi::AsyncFileUtil
> async_file_util_
;
48 DISALLOW_COPY_AND_ASSIGN(FileSystemBackendDelegate
);
53 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_BACKEND_DELEGATE_H_