OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "webkit/common/fileapi/file_system_types.h" | 10 #include "storage/common/fileapi/file_system_types.h" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class Time; | 13 class Time; |
14 } // namespace base | 14 } // namespace base |
15 | 15 |
16 namespace fileapi { | 16 namespace storage { |
17 class AsyncFileUtil; | 17 class AsyncFileUtil; |
18 class FileSystemContext; | 18 class FileSystemContext; |
19 class FileSystemURL; | 19 class FileSystemURL; |
20 class FileStreamWriter; | 20 class FileStreamWriter; |
21 } // namespace fileapi | 21 } // namespace storage |
22 | 22 |
23 namespace webkit_blob { | 23 namespace storage { |
24 class FileStreamReader; | 24 class FileStreamReader; |
25 } // namespace webkit_blob | 25 } // namespace storage |
26 | 26 |
27 namespace chromeos { | 27 namespace chromeos { |
28 | 28 |
29 // This is delegate interface to inject the implementation of the some methods | 29 // This is delegate interface to inject the implementation of the some methods |
30 // of FileSystemBackend. The main goal is to inject Drive File System. | 30 // of FileSystemBackend. The main goal is to inject Drive File System. |
31 class FileSystemBackendDelegate { | 31 class FileSystemBackendDelegate { |
32 public: | 32 public: |
33 virtual ~FileSystemBackendDelegate() {} | 33 virtual ~FileSystemBackendDelegate() {} |
34 | 34 |
35 // Called from FileSystemBackend::GetAsyncFileUtil(). | 35 // Called from FileSystemBackend::GetAsyncFileUtil(). |
36 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil( | 36 virtual storage::AsyncFileUtil* GetAsyncFileUtil( |
37 fileapi::FileSystemType type) = 0; | 37 storage::FileSystemType type) = 0; |
38 | 38 |
39 // Called from FileSystemBackend::CreateFileStreamReader(). | 39 // Called from FileSystemBackend::CreateFileStreamReader(). |
40 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( | 40 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( |
41 const fileapi::FileSystemURL& url, | 41 const storage::FileSystemURL& url, |
42 int64 offset, | 42 int64 offset, |
43 const base::Time& expected_modification_time, | 43 const base::Time& expected_modification_time, |
44 fileapi::FileSystemContext* context) = 0; | 44 storage::FileSystemContext* context) = 0; |
45 | 45 |
46 // Called from FileSystemBackend::CreateFileStreamWriter(). | 46 // Called from FileSystemBackend::CreateFileStreamWriter(). |
47 virtual scoped_ptr<fileapi::FileStreamWriter> CreateFileStreamWriter( | 47 virtual scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter( |
48 const fileapi::FileSystemURL& url, | 48 const storage::FileSystemURL& url, |
49 int64 offset, | 49 int64 offset, |
50 fileapi::FileSystemContext* context) = 0; | 50 storage::FileSystemContext* context) = 0; |
51 }; | 51 }; |
52 | 52 |
53 } // namespace chromeos | 53 } // namespace chromeos |
54 | 54 |
55 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 55 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
OLD | NEW |